Improved unit tests loading
This commit is contained in:
parent
2eeb58a43e
commit
43f7e1e7a1
|
@ -185,9 +185,8 @@ class TestWorkProver(unittest.TestCase):
|
||||||
self.thread.commandsQueue.put(("shutdown", ))
|
self.thread.commandsQueue.put(("shutdown", ))
|
||||||
self.thread.join()
|
self.thread.join()
|
||||||
|
|
||||||
loader = unittest.TestLoader()
|
def load_tests(loader, tests, pattern):
|
||||||
|
return unittest.TestSuite([
|
||||||
suite = unittest.TestSuite([
|
|
||||||
loader.loadTestsFromTestCase(TestUtils),
|
loader.loadTestsFromTestCase(TestUtils),
|
||||||
loader.loadTestsFromTestCase(TestDumbSolver),
|
loader.loadTestsFromTestCase(TestDumbSolver),
|
||||||
loader.loadTestsFromTestCase(TestForkingSolver),
|
loader.loadTestsFromTestCase(TestForkingSolver),
|
||||||
|
@ -201,5 +200,7 @@ if __name__ == "__main__":
|
||||||
|
|
||||||
multiprocessing.freeze_support()
|
multiprocessing.freeze_support()
|
||||||
|
|
||||||
|
loader = unittest.TestLoader()
|
||||||
runner = unittest.TextTestRunner()
|
runner = unittest.TextTestRunner()
|
||||||
runner.run(suite)
|
|
||||||
|
runner.run(load_tests(loader, [], None))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user