Esempio n. 1
0
 def test_detailed_list_no_docstring(self):
     ext = [_make_ext('nodoc', None)]
     em = extension.ExtensionManager.make_test_instance(ext)
     results = list(sphinxext._detailed_list(em))
     self.assertEqual(
         [
             ('nodoc', 'nodoc_module'),
             ('-----', 'nodoc_module'),
             ('\n', 'nodoc_module'),
             ('.. warning:: No documentation found in ENTRY_POINT(nodoc)',
              'nodoc_module'),
             ('\n', 'nodoc_module'),
         ],
         results,
     )
 def test_detailed_list_no_docstring(self):
     ext = [_make_ext('nodoc', None)]
     em = extension.ExtensionManager.make_test_instance(ext)
     results = list(sphinxext._detailed_list(em))
     self.assertEqual(
         [
             ('nodoc', 'nodoc_module'),
             ('-----', 'nodoc_module'),
             ('\n', 'nodoc_module'),
             (('.. warning:: No documentation found for '
               'nodoc in nodoc_module:nodoc'), 'nodoc_module'),
             ('\n', 'nodoc_module'),
         ],
         results,
     )
Esempio n. 3
0
 def test_detailed_list(self):
     results = list(sphinxext._detailed_list(self.em))
     self.assertEqual(
         [
             ('test1', 'test1_module'),
             ('-----', 'test1_module'),
             ('\n', 'test1_module'),
             ('One-line docstring', 'test1_module'),
             ('\n', 'test1_module'),
             ('test2', 'test2_module'),
             ('-----', 'test2_module'),
             ('\n', 'test2_module'),
             ('Multi-line docstring\n\nAnother para', 'test2_module'),
             ('\n', 'test2_module'),
         ],
         results,
     )
 def test_detailed_list(self):
     results = list(sphinxext._detailed_list(self.em))
     self.assertEqual(
         [
             ('test1', 'test1_module'),
             ('-----', 'test1_module'),
             ('\n', 'test1_module'),
             ('One-line docstring', 'test1_module'),
             ('\n', 'test1_module'),
             ('test2', 'test2_module'),
             ('-----', 'test2_module'),
             ('\n', 'test2_module'),
             ('Multi-line docstring\n\nAnother para', 'test2_module'),
             ('\n', 'test2_module'),
         ],
         results,
     )