diff options
| author | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2020-09-30 11:57:13 +0000 |
|---|---|---|
| committer | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2020-09-30 11:57:13 +0000 |
| commit | a1f65a3a086f9d459e6c0109223ef43bdb56b3e7 (patch) | |
| tree | 5880f80772b2ff8298b3fff9501e22b15ab070bd /test | |
| parent | 46854d19a5ac502c3487908bab8ebd29a3220143 (diff) | |
| download | docutils-a1f65a3a086f9d459e6c0109223ef43bdb56b3e7.tar.gz | |
Remove Test support classes for the orphaned Python Module Parser.
The Python module parser is orphaned and was moved to the sanbox
on 07.12.2010. So these classes are no longer required.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8566 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'test')
| -rw-r--r-- | test/DocutilsTestSupport.py | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/test/DocutilsTestSupport.py b/test/DocutilsTestSupport.py index 22996dc1c..dd902bd37 100644 --- a/test/DocutilsTestSupport.py +++ b/test/DocutilsTestSupport.py @@ -624,68 +624,6 @@ class SimpleTableParserTestSuite(CustomTestSuite): run_in_debugger=run_in_debugger) -class PythonModuleParserTestCase(CustomTestCase): - - def test_parser(self): - if self.run_in_debugger: - pdb.set_trace() - try: - import compiler - except ImportError: - # skip on Python 3 - return - from docutils.readers.python import moduleparser - module = moduleparser.parse_module(self.input, 'test data').pformat() - output = str(module) - self.compare_output(self.input, output, self.expected) - - def test_token_parser_rhs(self): - if self.run_in_debugger: - pdb.set_trace() - try: - import compiler - except ImportError: - # skip on Python 3 - return - from docutils.readers.python import moduleparser - tr = moduleparser.TokenParser(self.input) - output = tr.rhs(1) - self.compare_output(self.input, output, self.expected) - - -class PythonModuleParserTestSuite(CustomTestSuite): - - """ - A collection of PythonModuleParserTestCase. - """ - - def generateTests(self, dict, dictname='totest', - testmethod='test_parser'): - """ - Stock the suite with test cases generated from a test data dictionary. - - Each dictionary key (test type's name) maps to a list of tests. Each - test is a list: input, expected output, optional modifier. The - optional third entry, a behavior modifier, can be 0 (temporarily - disable this test) or 1 (run this test under the pdb debugger). Tests - should be self-documenting and not require external comments. - """ - for name, cases in dict.items(): - for casenum in range(len(cases)): - case = cases[casenum] - run_in_debugger = False - if len(case)==3: - if case[2]: - run_in_debugger = True - else: - continue - self.addTestCase( - PythonModuleParserTestCase, testmethod, - input=case[0], expected=case[1], - id='%s[%r][%s]' % (dictname, name, casenum), - run_in_debugger=run_in_debugger) - - class WriterPublishTestCase(CustomTestCase, docutils.SettingsSpec): """ |
