New POW calculation module #1284

Open
Kleshni wants to merge 38 commits from Kleshni/POW into v0.6
Showing only changes of commit 43f7e1e7a1 - Show all commits

View File

@ -185,21 +185,22 @@ 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), loader.loadTestsFromTestCase(TestFastSolver),
loader.loadTestsFromTestCase(TestFastSolver), loader.loadTestsFromTestCase(TestGPUSolver),
loader.loadTestsFromTestCase(TestGPUSolver), loader.loadTestsFromTestCase(TestWorkProver)
loader.loadTestsFromTestCase(TestWorkProver) ])
])
if __name__ == "__main__": if __name__ == "__main__":
import multiprocessing import multiprocessing
multiprocessing.freeze_support() multiprocessing.freeze_support()
loader = unittest.TestLoader()
runner = unittest.TextTestRunner() runner = unittest.TextTestRunner()
runner.run(suite)
runner.run(load_tests(loader, [], None))