diff options
author | Jason Pellerin <jpellerin@gmail.com> | 2007-04-27 20:27:52 +0000 |
---|---|---|
committer | Jason Pellerin <jpellerin@gmail.com> | 2007-04-27 20:27:52 +0000 |
commit | 10a1ef8fe6b190a7c5f863f40197ac96725d3f3f (patch) | |
tree | 0e9c58b43602cb436ffdd758d2bec72af97e4660 /functional_tests/test_doctest_plugin.py | |
parent | 6dec83efc005af74ca7c6b37332d57da3a1ce8a6 (diff) | |
download | nose-10a1ef8fe6b190a7c5f863f40197ac96725d3f3f.tar.gz |
Fixed bugs in doctest loading from non-module files. Added functional test.
Diffstat (limited to 'functional_tests/test_doctest_plugin.py')
-rw-r--r-- | functional_tests/test_doctest_plugin.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/functional_tests/test_doctest_plugin.py b/functional_tests/test_doctest_plugin.py index 0204eb0..c91ecc5 100644 --- a/functional_tests/test_doctest_plugin.py +++ b/functional_tests/test_doctest_plugin.py @@ -20,5 +20,25 @@ class TestDoctestPlugin(PluginTester, unittest.TestCase): assert str(self.output).strip().endswith('OK') +class TestDoctestFiles(PluginTester, unittest.TestCase): + activate = '--with-doctest' + args = ['-v', '--doctest-extension=.txt'] + plugins = [Doctest()] + suitepath = os.path.join(support, 'dtt', 'docs') + + def runTest(self): + print str(self.output) + + expect = [ + 'Doctest: doc.txt ... ok', + 'Doctest: errdoc.txt ... FAIL' + ] + for line in self.output: + if not line.strip(): + continue + if line.startswith('='): + break + self.assertEqual(line.strip(), expect.pop(0)) + if __name__ == '__main__': unittest.main() |