call site 14 for path.local.join
apigen/rest/testing/test_rest.py - line 94
93
94
95
96
97
98
99
100
   def test_write_section(self):
->     tempdir = temppath.ensure('dirwriter', dir=True)
       dw = self.get_filled_writer(DirWriter, tempdir)
       fpaths = tempdir.listdir('*.txt')
       assert len(fpaths) == 2
       assert sorted([f.basename for f in fpaths]) == ['bar.txt', 'foo.txt']
       assert _nl(tempdir.join('foo.txt').read()) == 'foo data\n'
       assert _nl(tempdir.join('bar.txt').read()) == 'bar data\n'
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 291
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
path/local/local.py - line 270
268
269
270
271
272
   def mkdir(self, *args):
       """ create & return the directory joined with args. """
->     p = self.join(*args)
       self._callex(os.mkdir, str(p))
       return p