File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ script:
1313 - python pep8.py --testsuite testsuite
1414 - python pep8.py --statistics pep8.py
1515 - python pep8.py --doctest
16- - python -m testsuite.test_all
16+ - python setup.py test
1717matrix :
1818 allow_failures :
1919 - python : pypy
Original file line number Diff line number Diff line change @@ -52,5 +52,5 @@ def get_long_description():
5252 'Programming Language :: Python :: 3' ,
5353 'Topic :: Software Development :: Libraries :: Python Modules' ,
5454 ],
55- test_suite = 'testsuite.test_all' ,
55+ test_suite = 'testsuite.test_all.suite ' ,
5656)
Original file line number Diff line number Diff line change @@ -45,16 +45,19 @@ def test_own_dog_food(self):
4545 msg = 'Failures: %s' % report .messages )
4646
4747
48- def _main ():
48+ def suite ():
4949 from testsuite .test_api import APITestCase
5050 from testsuite .test_shell import ShellTestCase
5151
5252 suite = unittest .TestSuite ()
5353 suite .addTest (unittest .makeSuite (Pep8TestCase ))
5454 suite .addTest (unittest .makeSuite (APITestCase ))
5555 suite .addTest (unittest .makeSuite (ShellTestCase ))
56- runner = unittest .TextTestRunner (verbosity = 2 )
57- return runner .run (suite )
56+ return suite
57+
58+
59+ def test_main ():
60+ return unittest .TextTestRunner (verbosity = 2 ).run (suite ())
5861
5962if __name__ == '__main__' :
60- sys .exit (not _main ())
63+ sys .exit (not test_main ())
You can’t perform that action at this time.
0 commit comments