Release 0.13.1: closed "Changes Since ..." section
[docutils.git] / test / test_parsers / test_get_parser_class.py
blob8f241685b9451303f00918a871ccc506fbc31147
1 #! /usr/bin/env python
3 # $Id$
4 # Author: grubert abadger1999
5 # Maintainer: docutils-develop@lists.sourceforge.net
6 # Copyright: This module has been placed in the public domain.
8 """
9 test get_parser_class
10 """
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__':
30 import unittest
31 unittest.main()