call site 0 for path.local.__eq__
apigen/source/testing/test_browser.py - line 43
42
43
44
45
46
47
48
49
50
51
52
53
54
   def test_if_browser():
->     tmp = py.test.ensuretemp("sourcebrowser")
       tmp.ensure("b.py").write(py.code.Source("""
           if 1:
               def f():
                   pass
           if 0:
               def g():
                   pass
       """))
       mod = parse_path(tmp.join("b.py"))
       assert isinstance(mod.f, Function)
       py.test.raises(AttributeError, 'mod.g')
test/config.py - line 18
11
12
13
14
15
16
17
18
   def ensuretemp(string, dir=1): 
       """ return temporary directory path with
           the given string as the trailing part. 
       """ 
       global basetemp
       if basetemp is None: 
           basetemp = py.path.local.make_numbered_dir(prefix='pytest-')
->     return basetemp.ensure(string, dir=dir) 
path/local/local.py - line 306
299
300
301
302
303
304
305
306
307
308
309
310
311
   def ensure(self, *args, **kwargs):
       """ ensure that an args-joined path exists (by default as
               a file). if you specify a keyword argument 'dir=True'
               then the path is forced to be a directory path.
           """
       p = self.join(*args)
       if kwargs.get('dir', 0):
->         return p._ensuredirs()
       else:
           p.dirpath()._ensuredirs()
           if not p.check(file=1):
               p.write("")
           return p
path/local/local.py - line 285
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
   def _ensuredirs(self):
       parent = self.dirpath()
->     if parent == self:
           return self
       if parent.check(dir=0):
           parent._ensuredirs()
       if self.check(dir=0):
           try:
               self.mkdir()
           except py.error.EEXIST:
               # race condition: file/dir created by another thread/process.
               # complain if it is not a dir
               if self.check(dir=0):
                   raise
       return self