From 4f3ca38bace8245773855e944ecb204ecdb6f9bc Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sun, 11 Nov 2012 22:02:10 -0500 Subject: [PATCH] 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 --- pym/gentoolkit/test/test_syntax.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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__': -- 2.26.2