call site 0 for path.local.mkdir
apigen/testing/test_apigen_example.py - line 271
270
271
272
273
274
275
   def test_build_namespace_pages_subnamespace(self):
->     self.apb.build_namespace_pages()
       subfile = self.base.join('api/main.sub.html')
       assert subfile.check()
       html = subfile.read()
       _checkhtml(html)
apigen/htmlgen.py - line 569
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
   def build_namespace_pages(self):
       passed = []
       module_name = self.dsa.get_module_name().split('/')[-1]
   
       names = self.namespace_tree.keys()
       names.sort()
       function_names = self.dsa.get_function_names()
       class_names = self.dsa.get_class_names()
       for dotted_name in sorted(names):
           if self.capture:
               self.capture.err.writeorg('.')
           if dotted_name in function_names or dotted_name in class_names:
               continue
           subitem_dotted_names = self.namespace_tree[dotted_name]
           tag = H.Content(self.build_namespace_view(dotted_name,
                                                     subitem_dotted_names))
           nav = self.build_navigation(dotted_name, True)
           if dotted_name == '':
               reltargetpath = 'api/index.html'
           else:
               reltargetpath = 'api/%s.html' % (dotted_name,)
           self.linker.set_link(dotted_name, reltargetpath)
           title_name = dotted_name
           if dotted_name == '':
               title_name = self.dsa.get_module_name()
           title = 'index of %s' % (title_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 308
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