Beispiel #1
0
def run_tests(verbosity=2):
    """Run the modules unit tests"""
    spacer = "----------------------------------------------------------------------"
    if verbosity > 1:
        print('Running mtfit/algorithms/base.py Tests')
        print(spacer)
        test_result = _run_tests(base_test_suite(verbosity), verbosity)
        print(spacer)
        print('Running mtfit/algorithms/monte_carlo.py Tests')
        print(spacer)
        test_result = _run_tests(monte_carlo_test_suite(verbosity),
                                 verbosity,
                                 test_result=test_result)
        print(spacer)
        print('Running mtfit/algorithms/markov_chain_monte_carlo.py Tests')
        print(spacer)
        test_result = _run_tests(
            markov_chain_monte_carlo_test_suite(verbosity),
            verbosity,
            test_result=test_result)
    else:
        print('Running unit tests')
        print(spacer)
        test_result = _run_tests(test_suite(verbosity), verbosity)
    return test_result
Beispiel #2
0
def run_tests(verbosity=2):
    """Run the modules unit tests"""
    spacer = "----------------------------------------------------------------------"
    if verbosity > 1:
        print('Running probability/probability.py Tests')
        print(spacer)
        test_result = _run_tests(probability_test_suite(verbosity), verbosity)
    else:
        print('Running unit tests')
        print(spacer)
        test_result = _run_tests(test_suite(verbosity), verbosity)
    return test_result
Beispiel #3
0
def run_tests(verbosity=2):
    """Run the modules unit tests"""
    spacer = "----------------------------------------------------------------------"
    if verbosity > 1:
        print('Running convert/moment_tensor_conversion.py Tests')
        print(spacer)
        test_result = _run_tests(moment_tensor_conversion_test_suite(verbosity), verbosity)
        print(spacer)
        print('Running convert/cmoment_tensor_conversion.py Tests')
        print(spacer)
        test_result = _run_tests(cmoment_tensor_conversion_test_suite(verbosity), verbosity, test_result=test_result)
    else:
        print('Running unit tests')
        print(spacer)
        test_result = _run_tests(test_suite(verbosity), verbosity)
    return test_result
Beispiel #4
0
def run_tests(verbosity=2):
    """Run the modules unit tests"""
    spacer = "----------------------------------------------------------------------"
    if verbosity > 1:
        print('Running utilities/unittest_utils.py Tests')
        print(spacer)
        test_result = _run_tests(unittest_utils_test_suite(verbosity),
                                 verbosity)
        print('\n' + spacer)
        print('Running utilities/argparser.py Tests')
        print(spacer)
        test_result = _run_tests(argparser_test_suite(verbosity),
                                 verbosity,
                                 test_result=test_result)
        print('\n' + spacer)
        print('Running utilities/exception_handler.py Tests')
        print(spacer)
        test_result = _run_tests(extensions_test_suite(verbosity),
                                 verbosity,
                                 test_result=test_result)
        print('\n' + spacer)
        print('Running utilities/file_io.py Tests')
        print(spacer)
        test_result = _run_tests(file_io_test_suite(verbosity),
                                 verbosity,
                                 test_result=test_result)
        print('\n' + spacer)
        print('Running utilities/multiprocessing_helper.py Tests')
        print(spacer)
        test_result = _run_tests(multiprocessing_helper_test_suite(verbosity),
                                 verbosity,
                                 test_result=test_result)
    else:
        print('Running unit tests')
        print(spacer)
        test_result = _run_tests(test_suite(verbosity), verbosity)
    return test_result
Beispiel #5
0
def run_tests(verbosity=2):
    """Run tests"""
    _run_tests(test_suite(verbosity), verbosity)