tests/runtests.py
def main():
    '''
    Main method. Discovers and runs tests in the 'tests' subdirectory.
    '''
    cli_argparser = get_cli_argparser()
    cli_args = cli_argparser.parse_args()

    if cli_args.list not in [None, False]:
        raise cli_argparser.error('Test listing is not yet implemented')

    configure_logging(cli_args.log_level, cli_args.log_file)

    logger.debug('initialized logger, about to load tests')

    test_dir = os.path.dirname(__file__)
    project_dir = os.path.join(test_dir, '..')
    test_suite = unittest.defaultTestLoader.discover(
        'tests', pattern='*.py', top_level_dir=project_dir,
    )

    logger.info('loaded %d tests: %s', test_suite.countTestCases(),
                get_test_suite_items(test_suite))
    logger.debug('about to run tests')

    test_runner_logstream = TestRunnerLogStream()
    test_runner = unittest.TextTestRunner(
        stream=test_runner_logstream, verbosity=2,
    )

    unittest.installHandler()
    test_runner.run(test_suite)

    Main method. Discovers and runs tests in the 'tests' subdirectory.
    
Main method. Discovers and runs tests in the 'tests' subdirectory.
Main method . Discovers and runs tests in the ' tests ' subdirectory .
def main():
    cli_argparser = get_cli_argparser()
    cli_args = cli_argparser.parse_args()
    if cli_args.list not in [None, False]:
        raise cli_argparser.error('Test listing is not yet implemented')
    configure_logging(cli_args.log_level, cli_args.log_file)
    logger.debug('initialized logger, about to load tests')
    test_dir = os.path.dirname(__file__)
    project_dir = os.path.join(test_dir, '..')
    test_suite = unittest.defaultTestLoader.discover(
        'tests', pattern='*.py', top_level_dir=project_dir,
    )
    logger.info('loaded %d tests: %s', test_suite.countTestCases(),
                get_test_suite_items(test_suite))
    logger.debug('about to run tests')
    test_runner_logstream = TestRunnerLogStream()
    test_runner = unittest.TextTestRunner(
        stream=test_runner_logstream, verbosity=2,
    )
    unittest.installHandler()
    test_runner.run(test_suite)
def main ( ) : cli_argparser = get_cli_argparser ( ) cli_args = cli_argparser . parse_args ( ) if cli_args . list not in [ None , False ] : raise cli_argparser . error ( 'Test listing is not yet implemented' ) configure_logging ( cli_args . log_level , cli_args . log_file ) logger . debug ( 'initialized logger, about to load tests' ) test_dir = os . path . dirname ( __file__ ) project_dir = os . path . join ( test_dir , '..' ) test_suite = unittest . defaultTestLoader . discover ( 'tests' , pattern = '*.py' , top_level_dir = project_dir , ) logger . info ( 'loaded %d tests: %s' , test_suite . countTestCases ( ) , get_test_suite_items ( test_suite ) ) logger . debug ( 'about to run tests' ) test_runner_logstream = TestRunnerLogStream ( ) test_runner = unittest . TextTestRunner ( stream = test_runner_logstream , verbosity = 2 , ) unittest . installHandler ( ) test_runner . run ( test_suite )
Main method.
Main method .
'''
    Main method. Discovers and runs tests in the 'tests' subdirectory.
    '''