Remove TODO comment: writer import with python >= 2.7 is solved
[docutils.git] / test / test_writers / test_get_writer_class.py
blob9b2fe1c0c99f1d889b58c1c8da720d58a07e9fa6
1 #! /usr/bin/env python
3 # $Id$
4 # Author: grubert
5 # Maintainer: docutils-develop@lists.sourceforge.net
6 # Copyright: This module has been placed in the public domain.
8 """
9 test get_writer_class
10 """
12 from __init__ import DocutilsTestSupport
13 from docutils.writers import get_writer_class
15 class GetWriterClassTestCase(DocutilsTestSupport.StandardTestCase):
16 #tests = ( ('manpage', 1), ('nope', 0), ('dummy-writer', 1))
18 def test_registered_writer(self):
19 wr = get_writer_class('manpage')
20 # raises ImportError on failure
22 def test_bogus_writer(self):
23 self.assertRaises(ImportError,
24 get_writer_class, 'nope')
26 def test_local_writer(self):
27 # requires local-writer.py in test directory (testroot)
28 wr = get_writer_class('local-writer')
30 if __name__ == '__main__':
31 import unittest
32 unittest.main()