コード例 #1
0
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()
コード例 #2
0
    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()
コード例 #3
0
ファイル: runtests.py プロジェクト: cpcloud/numba
    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()
コード例 #4
0
ファイル: runtests.py プロジェクト: bmk10/GridMateBook_1.18
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()
コード例 #5
0
ファイル: runtests.py プロジェクト: stefanseefeld/numba
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()
コード例 #6
0
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()
コード例 #7
0
ファイル: runtests.py プロジェクト: cpcloud/numba
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()
コード例 #8
0
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()
コード例 #9
0
ファイル: runtests.py プロジェクト: MJJoyce/numba
def test():
    suite = discover_tests("numba.cuda.tests.cudapy.runtests")
    return run_tests(suite).wasSuccessful()
コード例 #10
0
ファイル: runtests.py プロジェクト: dhavide/numba
#!/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)
コード例 #11
0
def test():
    suite = discover_tests("numba.hsa.tests.hsadrv")
    return run_tests(suite).wasSuccessful()
コード例 #12
0
ファイル: runtests.py プロジェクト: maartenscholl/numba
#!/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)
コード例 #13
0
ファイル: runtests.py プロジェクト: CaptainAL/Spyder
def test():
    suite = discover_tests("numba.cuda.tests.nocuda.runtests")
    return run_tests(suite, nomultiproc=True).wasSuccessful()
コード例 #14
0
import sys
from numba.testing import run_tests

sys.exit(0 if run_tests(sys.argv).wasSuccessful() else 1)
コード例 #15
0
ファイル: __init__.py プロジェクト: GaZ3ll3/numba
def runtests(modname):
    suite = discover_tests(modname)
    return run_tests(suite).wasSuccessful()
コード例 #16
0
def test():
    suite = discover_tests("numba.cuda.tests.cudapy.runtests")
    return run_tests(suite, nomultiproc=True).wasSuccessful()
コード例 #17
0
ファイル: __init__.py プロジェクト: menghaozhu/hat
def runtests(modname):
    suite = discover_tests(modname)
    return run_tests(suite).wasSuccessful()