def test_check_internal_links(self): |
-> ds = self.get_filled_docstorage() |
lg = DirectFS() |
tempdir = temppath.ensure('internal_links', dir=True) |
r = RestGen(ds, lg, DirWriter(tempdir)) |
r.write() |
index = tempdir.join('module_Unknown module.txt') |
assert index.check(file=True) |
data = _nl(index.read()) |
assert data.find('.. _`fun`: function_fun.html\n') > -1 |
assert data.find('.. _`fun`: #function-fun\n') == -1 |
|
tempfile = temppath.ensure('internal_links.txt', |
file=True) |
r = RestGen(ds, lg, FileWriter(tempfile)) |
r.write() |
data = _nl(tempfile.read()) |
assert data.find('.. _`fun`: #function-fun\n') > -1 |
assert data.find('.. _`fun`: function_fun.html') == -1 |
tempfile = temppath.ensure("internal_links_ps.txt", file=True) |
if 0: |
ps = PermaDocStorage(ds) |
r = RestGen(ps, lg, FileWriter(tempfile)) |
r.write() |
data = _nl(tempfile.read()) |
assert data.find('.. _`fun`: #function-fun\n') > -1 |
assert data.find('.. _`fun`: function_fun.html') == -1 |
pickle.dumps(ps) |