call site 0 for path.local.mkdir
apigen/testing/test_apigen_example.py - line 188
185
186
187
188
189
190
191
192
193
194
195
   def test_build_class_pages_instance(self):
       self.apb.build_class_pages(['main.SomeClass',
                                   'main.SomeSubClass',
->                                 'main.SomeInstance'])
       clsfile = self.base.join('api/main.SomeInstance.html')
       assert clsfile.check()
       html = clsfile.read()
       print html
       run_string_sequence_test(html, [
           'instance of SomeClass()',
       ])
apigen/htmlgen.py - line 518
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
   def build_class_pages(self, classes_dotted_names):
       passed = []
       for dotted_name in sorted(classes_dotted_names):
           if self.capture:
               self.capture.err.writeorg('.')
           parent_dotted_name, _ = split_of_last_part(dotted_name)
           try:
               sibling_dotted_names = self.namespace_tree[parent_dotted_name]
           except KeyError:
               # no siblings (built-in module or sth)
               sibling_dotted_names = []
           tag = H.Content(self.build_class_view(dotted_name))
           nav = self.build_navigation(dotted_name, False)
           reltargetpath = "api/%s.html" % (dotted_name,)
           self.linker.set_link(dotted_name, reltargetpath)
           title = '%s API' % (dotted_name,)
           rev = self.get_revision(dotted_name)
           if rev:
               title += ' [rev. %s]' % (rev,)
->         self.write_page(title, reltargetpath, tag, nav)
       return passed
apigen/htmlgen.py - line 202
193
194
195
196
197
198
199
200
201
202
203
   def write_page(self, title, reltargetpath, tag, nav):
       targetpath = self.base.join(reltargetpath)
       relbase= relpath('%s%s' % (targetpath.dirpath(), targetpath.sep),
                        self.base.strpath + '/')
       page = wrap_page(self.project, title, targetpath, tag, nav, self.base,
                        self.pageclass)
       # we write the page with _temporary_ hrefs here, need to be replaced
       # from the TempLinker later
       content = page.unicode()
->     targetpath.ensure()
       targetpath.write(content.encode("utf8"))
path/local/local.py - line 307
298
299
300
301
302
303
304
305
306
307
308
309
310
   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 290
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
   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