and
are actually UTF-8 \xa0 characters (non-breaking
# spaces)!
assert """\
""" in html
def test_build_root_namespace_view(self):
self.apb.build_namespace_pages()
self.linker.replace_dirpath(self.base, False)
rootfile = self.base.join('api/index.html')
assert rootfile.check()
html = rootfile.read()
assert '' in html
_checkhtml(html)
class TestSourcePageBuilder(AbstractBuilderTest):
def test_build_pages(self):
self.spb.build_pages(self.fs_root)
somesource = self.base.join('source/pkg/func.py.html').read()
_checkhtml(somesource)
def test_build_pages_nav(self):
self.spb.build_pages(self.fs_root)
self.linker.replace_dirpath(self.base, False)
funcsource = self.base.join('source/pkg/func.py.html')
assert funcsource.check(file=True)
html = funcsource.read()
print html
run_string_sequence_test(html, [
'href="../../style.css"',
'pkg',
'
someclass.py',
'
somesubclass.py',
])
def test_build_dir_page(self):
self.spb.build_pages(self.fs_root)
self.linker.replace_dirpath(self.base, False)
pkgindex = self.base.join('source/pkg/index.html')
assert pkgindex.check(file=True)
html = pkgindex.read()
print html
run_string_sequence_test(html, [
'href="../../style.css"',
'
pkg',
'
func.py',
'
someclass.py',
'
somesubclass.py',
'
directories
',
'
files
'])
_checkhtml(html)
def test_build_source_page(self):
self.spb.build_pages(self.fs_root)
self.linker.replace_dirpath(self.base, False)
funcsource = self.base.join('source/pkg/func.py.html')
assert funcsource.check(file=True)
html = funcsource.read()
print html
assert ('
def func(arg1)') in html
def test_build_navigation_root(self):
self.spb.build_pages(self.fs_root)
self.linker.replace_dirpath(self.base)
html = self.base.join('source/pkg/index.html').read()
print html
run_string_sequence_test(html, [
'href="index.html">pkg',
'href="func.py.html">func.py',
'href="someclass.py.html">someclass.py',
'href="somesubclass.py.html">somesubclass.py',
])