def _main(argv, **kwds): # This helper function assumes the first element of argv # is the name of the calling program. # The 'main' API function is invoked in-process, and thus # will synthesize that name. return run_tests(argv, defaultTest='pyculib', topleveldir=dirname(dirname(__file__)), **kwds).wasSuccessful()
def main(self, argv, kwds): from numba.testing import run_tests prog = argv[0] argv = argv[1:] flags = [a for a in argv if a.startswith('-')] all_tests, failed_tests = self.find_last_failed(argv) # Prepare tests to run if failed_tests: ft = "There were {} previously failed tests" print(ft.format(len(failed_tests))) remaing_tests = [t for t in all_tests if t not in failed_tests] if self.last_failed: tests = list(failed_tests) else: tests = failed_tests + remaing_tests else: if self.last_failed: tests = [] else: tests = list(all_tests) if not tests: print("No tests to run") return True # Run the testsuite print("Running {} tests".format(len(tests))) print('Flags', flags) result = run_tests([prog] + flags + tests, **kwds) # Update failed tests records only if we have run the all the tests # last failed. if len(tests) == result.testsRun: self.save_failed_tests(result, all_tests) return result.wasSuccessful()
def main(self, argv, kwds): from numba.testing import run_tests prog = argv[0] argv = argv[1:] flags = [a for a in argv if a.startswith('-')] all_tests, failed_tests = self.find_last_failed(argv) # Prepare tests to run if failed_tests: ft = "There were {} previously failed tests" print(ft.format(len(failed_tests))) remaing_tests = [t for t in all_tests if t not in failed_tests] if self.last_failed: tests = list(failed_tests) else: tests = failed_tests + remaing_tests else: if self.last_failed: tests = [] else: tests = list(all_tests) if not tests: print("No tests to run") return True # Run the testsuite print("Running {} tests".format(len(tests))) print('Flags', flags) result = run_tests([prog] + flags + tests, **kwds) # Save failed self.save_failed_tests(result, all_tests) return result.wasSuccessful()
def _main(argv, **kwds): from numba.testing import run_tests # This helper function assumes the first element of argv # is the name of the calling program. # The 'main' API function is invoked in-process, and thus # will synthesize that name. return run_tests(argv, defaultTest='numba.tests', **kwds).wasSuccessful()
def _main(argv, **kwds): from numba.testing import run_tests # This helper function assumes the first element of argv # is the name of the calling program. # The 'main' API function is invoked in-process, and thus # will synthesize that name. return run_tests(argv, defaultTest="numba.tests", **kwds).wasSuccessful()
def _main(argv, **kwds): from numba.testing import run_tests # This helper function assumes the first element of argv # is the name of the calling program. # The 'main' API function is invoked in-process, and thus # will synthesize that name. if '--failed-first' in argv: # Failed first argv.remove('--failed-first') return _FailedFirstRunner().main(argv, kwds) elif '--last-failed' in argv: argv.remove('--last-failed') return _FailedFirstRunner(last_failed=True).main(argv, kwds) else: return run_tests(argv, defaultTest='numba.tests', **kwds).wasSuccessful()
def _main(argv, **kwds): from numba.testing import run_tests # This helper function assumes the first element of argv # is the name of the calling program. # The 'main' API function is invoked in-process, and thus # will synthesize that name. if "--log" in argv: logging.basicConfig(level=logging.DEBUG) argv.remove("--log") if "--failed-first" in argv: # Failed first argv.remove("--failed-first") return _FailedFirstRunner().main(argv, kwds) elif "--last-failed" in argv: argv.remove("--last-failed") return _FailedFirstRunner(last_failed=True).main(argv, kwds) else: return run_tests(argv, defaultTest="numba.tests", **kwds).wasSuccessful()
def test(): suite = discover_tests("numba.cuda.tests.cudapy.runtests") return run_tests(suite).wasSuccessful()
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function, division, absolute_import import sys import numba.testing as testing if __name__ == "__main__": result = testing.run_tests(sys.argv) sys.exit(0 if result.wasSuccessful() else 1)
def test(): suite = discover_tests("numba.hsa.tests.hsadrv") return run_tests(suite).wasSuccessful()
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function, division, absolute_import import sys import numba.testing as testing if __name__ == "__main__": result = testing.run_tests(sys.argv) sys.exit(0 if result else 1)
def test(): suite = discover_tests("numba.cuda.tests.nocuda.runtests") return run_tests(suite, nomultiproc=True).wasSuccessful()
import sys from numba.testing import run_tests sys.exit(0 if run_tests(sys.argv).wasSuccessful() else 1)
def runtests(modname): suite = discover_tests(modname) return run_tests(suite).wasSuccessful()
def test(): suite = discover_tests("numba.cuda.tests.cudapy.runtests") return run_tests(suite, nomultiproc=True).wasSuccessful()