[svn r37913] Some more cleanups in HTML generation, fixed support for docstrings in

namespaces, in order to do this I had to change the way objects are retrieved:
instead of getting them from the DSA I now walk the package tree, small change
in apigen.py: to allow re-using the get_documentable_items function I split it
up in a generic and a specific part.

--HG--
branch : trunk
This commit is contained in:
guido
2007-02-04 15:35:28 +01:00
parent 7852ead1fe
commit 98b4dcf155
6 changed files with 111 additions and 58 deletions

View File

@@ -116,7 +116,7 @@ class AbstractBuilderTest(object):
self.namespace_tree = namespace_tree
self.apb = ApiPageBuilder(base, linker, self.dsa,
self.fs_root.join(self.pkg_name),
namespace_tree)
namespace_tree, 'root docstring')
self.spb = SourcePageBuilder(base, linker,
self.fs_root.join(self.pkg_name))
@@ -130,7 +130,7 @@ class TestApiPageBuilder(AbstractBuilderTest):
pkg.main.sub.func(pkg.main.SomeClass(10))
t.end_tracing()
apb = ApiPageBuilder(self.base, self.linker, dsa, self.fs_root,
self.namespace_tree)
self.namespace_tree, 'root docstring')
snippet = apb.build_callable_view('main.sub.func')
html = snippet.unicode()
print html
@@ -371,8 +371,7 @@ class TestSourcePageBuilder(AbstractBuilderTest):
assert funcsource.check(file=True)
html = funcsource.read()
print html
assert ('<span class="alt_keyword">def</span> '
'<a href="#func" name="func">func</a>(arg1):') in html
assert ('<span class="alt_keyword">def</span> func(arg1)') in html
def test_build_navigation_root(self):
self.spb.prepare_pages(self.fs_root)