diff options
| author | W. Trevor King <wking@tremily.us> | 2012-11-11 22:02:10 -0500 |
|---|---|---|
| committer | W. Trevor King <wking@tremily.us> | 2012-11-11 22:02:10 -0500 |
| commit | 4f3ca38bace8245773855e944ecb204ecdb6f9bc (patch) | |
| tree | a67fb0179b767a1055d6836bbedb39e38f0a55b9 | |
| parent | 6c751ebd67a981557e5bc9657efef2e6f5f4614d (diff) | |
| download | gentoolkit-4f3ca38bace8245773855e944ecb204ecdb6f9bc.tar.gz | |
test_syntax: fix test_main and mark so nosetests will ignore it
* fix TestGentoolkitHelpers2 -> TestForSyntaxErrors
* use unittest.TestLoader and TextTestRunner instead of test.test_support
From the Python documentation [1]:
The test package is meant for internal use by Python only. It is
documented for the benefit of the core developers of Python. Any use
of this package outside of Python's standard library is discouraged
as code mentioned here can change or be removed without notice
between releases of Python.
[1]: http://docs.python.org/2/library/test.html
| -rw-r--r-- | pym/gentoolkit/test/test_syntax.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pym/gentoolkit/test/test_syntax.py b/pym/gentoolkit/test/test_syntax.py index 325034a..7a990ca 100644 --- a/pym/gentoolkit/test/test_syntax.py +++ b/pym/gentoolkit/test/test_syntax.py @@ -27,7 +27,10 @@ class TestForSyntaxErrors(unittest.TestCase): def test_main(): - test_support.run_unittest(TestGentoolkitHelpers2) + suite = unittest.TestLoader().loadTestsFromTestCase( + TestForSyntaxErrors) + unittest.TextTestRunner(verbosity=2).run(suite) +test_main.__test__ = False if __name__ == '__main__': |
