call site 15 for path.local.read
apigen/testing/test_apigen_example.py - line 202
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
   def test_build_class_pages_nav_links(self):
       self.apb.build_class_pages(['main.SomeSubClass',
                                   'main.SomeClass'])
       self.apb.build_namespace_pages()
       # fake some stuff that would be built from other methods
->     self.linker.replace_dirpath(self.base, False)
       clsfile = self.base.join('api/main.SomeClass.html')
       assert clsfile.check()
       html = clsfile.read()
       print html
       run_string_sequence_test(html, [
           'href="../style.css"',
           'href="../apigen_style.css"',
           'src="../api.js"',
           'href="index.html">pkg',
           'href="main.html">main',
           'href="main.SomeClass.html">SomeClass',
           'href="main.SomeSubClass.html">SomeSubClass',
       ])
       assert 'href="main.sub.func.html"' not in html
       assert 'href="_test' not in html
       assert 'href="main.sub.html">sub' in html
       _checkhtml(html)
apigen/linker.py - line 86
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
   def replace_dirpath(self, dirpath, stoponerrors=True):
       """ replace temporary links in all html files in dirpath and below """
       for fpath in dirpath.visit('*.html'):
->         html = fpath.read()
           while 1:
               match = self._reg_tempurl.search(html)
               if not match:
                   break
               tempurl = match.group(1)
               try:
                   html = html.replace('"' + tempurl + '"',
                                       '"' + self.get_target(tempurl,
                                               fpath.relto(dirpath)) + '"')
               except KeyError:
                   if stoponerrors:
                       raise
                   html = html.replace('"' + tempurl + '"',
                                       '"apigen.notfound://%s"' % (tempurl,))
           fpath.write(html)