def test_simple_list(self): results = list(sphinxext._simple_list(self.em)) self.assertEqual( [ ('* test1 -- One-line docstring', 'test1_module'), ('* test2 -- Multi-line docstring', 'test2_module'), ], results, )
def test_simple_list_no_docstring(self): ext = [_make_ext('nodoc', None)] em = extension.ExtensionManager.make_test_instance(ext) results = list(sphinxext._simple_list(em)) self.assertEqual( [ ('* nodoc -- ', 'nodoc_module'), ], results, )