File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -140,7 +140,6 @@ def run_tests(filename):
140140 return report .counters ['failed tests' ]
141141
142142 pep8style .runner = run_tests
143- init_tests .__test__ = False
144143
145144
146145def run_tests (style ):
@@ -159,4 +158,6 @@ def run_tests(style):
159158 if options .testsuite :
160159 init_tests (style )
161160 return style .check_files ()
162- run_tests .__test__ = False
161+
162+ # nose should not collect these functions
163+ init_tests .__test__ = run_tests .__test__ = False
Original file line number Diff line number Diff line change @@ -46,18 +46,17 @@ def test_own_dog_food(self):
4646
4747
4848def suite ():
49- from testsuite .test_api import APITestCase
50- from testsuite .test_shell import ShellTestCase
49+ from testsuite import test_api , test_shell
5150
5251 suite = unittest .TestSuite ()
5352 suite .addTest (unittest .makeSuite (Pep8TestCase ))
54- suite .addTest (unittest .makeSuite (APITestCase ))
55- suite .addTest (unittest .makeSuite (ShellTestCase ))
53+ suite .addTest (unittest .makeSuite (test_api . APITestCase ))
54+ suite .addTest (unittest .makeSuite (test_shell . ShellTestCase ))
5655 return suite
5756
5857
59- def test_main ():
58+ def _main ():
6059 return unittest .TextTestRunner (verbosity = 2 ).run (suite ())
6160
6261if __name__ == '__main__' :
63- sys .exit (not test_main ())
62+ sys .exit (not _main ())
You can’t perform that action at this time.
0 commit comments