benji-york / manuel

Manuel lets you mix and match traditional doctests with custom test syntax.
Apache License 2.0
18 stars 15 forks source link

Support for doctest2 #16

Open tonysyu opened 6 years ago

tonysyu commented 6 years ago

Is it possible to run manuel with doctest2? Specifically, I'd to use doctest2's support for exceptions and output, which isn't supported by doctest

FWIW, it's not as simple as:

import doctest2
import manuel.doctest
import manuel.testing
import unittest

m = manuel.doctest.Manuel(parser=doctest2.DocTestParser())
test_suite = manuel.testing.TestSuite(m, 'doc.rst')
unittest.TextTestRunner().run(test_suite)