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
.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__':