def test_generation_modules(self): |
-> ds = self.get_filled_docstorage_modules() |
lg = DirectPaste() |
tempdir = temppath.ensure('module_api', dir=True) |
r = RestGen(ds, lg, DirWriter(tempdir)) |
r.write() |
basenames = [p.basename for p in tempdir.listdir('*.txt')] |
expected = [ |
'class_somemodule.SomeClass.txt', |
'class_someothermodule.SomeSubClass.txt', |
'function_someothermodule.fun.txt', |
'index.txt', |
'method_somemodule.SomeClass.__init__.txt', |
'method_somemodule.SomeClass.method.txt', |
'method_someothermodule.SomeSubClass.__init__.txt', |
'method_someothermodule.SomeSubClass.method.txt', |
'module_Unknown module.txt', |
'module_somemodule.txt', |
'module_someothermodule.txt', |
'traceback_somemodule.SomeClass.__init__.0.txt', |
'traceback_someothermodule.SomeSubClass.__init__.0.txt', |
'traceback_someothermodule.SomeSubClass.method.0.txt', |
'traceback_someothermodule.fun.0.txt', |
'traceback_someothermodule.fun.1.txt', |
] |
print sorted(basenames) |
assert sorted(basenames) == expected |