summaryrefslogtreecommitdiff
path: root/docutils/test/DocutilsTestSupport.py
diff options
context:
space:
mode:
authorwiemann <wiemann@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2004-10-30 13:57:06 +0000
committerwiemann <wiemann@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2004-10-30 13:57:06 +0000
commit4f3410faedbdf2265420ad129e816d83e2538462 (patch)
tree19c2f18badd4b7defe7cd1d02d08cfde4705b495 /docutils/test/DocutilsTestSupport.py
parent824a2fcb371df1b37b62b9088be580d73aefb570 (diff)
downloaddocutils-4f3410faedbdf2265420ad129e816d83e2538462.tar.gz
added TransitionTestCase, which applies transforms
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@2773 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docutils/test/DocutilsTestSupport.py')
-rw-r--r--docutils/test/DocutilsTestSupport.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/docutils/test/DocutilsTestSupport.py b/docutils/test/DocutilsTestSupport.py
index e920a768c..6bc536965 100644
--- a/docutils/test/DocutilsTestSupport.py
+++ b/docutils/test/DocutilsTestSupport.py
@@ -23,6 +23,7 @@ Exports the following:
- `TransformTestSuite`
- `ParserTestCase`
- `ParserTestSuite`
+ - `TransitionTestCase`
- `PEPParserTestCase`
- `PEPParserTestSuite`
- `GridTableParserTestCase`
@@ -426,6 +427,26 @@ class ParserTestSuite(CustomTestSuite):
run_in_debugger=run_in_debugger)
+class TransitionTestCase(ParserTestCase):
+
+ """
+ Transitions-specific test case, testing parser and transforms.
+ For use with ParserTestSuite.
+ """
+
+ def test_parser(self):
+ if self.run_in_debugger:
+ pdb.set_trace()
+ document = utils.new_document('test data', self.settings)
+ # Remove any additions made by "role" directives:
+ roles._roles = {}
+ self.parser.parse(self.input, document)
+ document.transformer.apply_transforms()
+ output = document.pformat()
+ self.compare_output(self.input, output, self.expected)
+
+
+
class PEPParserTestCase(ParserTestCase):
"""PEP-specific parser test case."""