4 # Author: grubert abadger1999
5 # Maintainer: docutils-develop@lists.sourceforge.net
6 # Copyright: This module has been placed in the public domain.
12 from __init__
import DocutilsTestSupport
13 from docutils
.parsers
import get_parser_class
15 class GetParserClassTestCase(DocutilsTestSupport
.StandardTestCase
):
17 def test_registered_parser(self
):
18 rdr
= get_parser_class('rst')
19 # raises ImportError on failure
21 def test_bogus_parser(self
):
22 self
.assertRaises(ImportError,
23 get_parser_class
, 'nope')
25 def test_local_parser(self
):
26 # requires local-parser.py in test directory (testroot)
27 wr
= get_parser_class('local-parser')
29 if __name__
== '__main__':