def test_cover_all(self): pkg = PythonPackage(SAMPLE) cov = Coverage([pkg]) task = list(cov.all('my_cov'))[0] assert task['verbosity'] == 2 assert task['basename'] == 'my_cov' assert task['actions'] == [ 'coverage run --branch `which py.test`', 'coverage report --show-missing {}'.format(' '.join(pkg.all_modules())) ]
def test_cover_all_multiprocessing(self): pkg = PythonPackage(SAMPLE) cov = Coverage([pkg], config=Config(concurrency='multiprocessing')) task = list(cov.all('my_cov'))[0] assert task['verbosity'] == 2 assert task['basename'] == 'my_cov' assert task['actions'] == [ 'coverage run --branch --concurrency multiprocessing `which py.test`', 'coverage report --show-missing {}'.format(' '.join( pkg.all_modules())) ]
def test_cover_all_parallel(self): pkg = PythonPackage(SAMPLE) cov = Coverage([pkg], config=Config(parallel=True, branch=False, omit=['abc'])) task = list(cov.all('my_cov'))[0] assert task['verbosity'] == 2 assert task['basename'] == 'my_cov' assert task['actions'] == [ 'coverage run --parallel-mode `which py.test`', 'coverage combine', 'coverage report --show-missing --omit abc {}'.format(' '.join( pkg.all_modules())) ]
def test_cover_all_parallel(self): pkg = PythonPackage(SAMPLE) cov = Coverage([pkg], config=Config(parallel=True, branch=False, omit=['abc'])) task = list(cov.all('my_cov'))[0] assert task['verbosity'] == 2 assert task['basename'] == 'my_cov' assert task['actions'] == [ 'coverage run --parallel-mode `which py.test`', 'coverage combine', 'coverage report --show-missing --omit abc {}'.format( ' '.join(pkg.all_modules())) ]
def test_all_modules(self): pkg = PythonPackage(SAMPLE) all_modules = list(pkg.all_modules()) assert len(all_modules) == 4 assert str(SAMPLE / 'flake_fail.py') in all_modules
def test_all_modules(self): pkg = PythonPackage(SAMPLE) all_modules = list(pkg.all_modules()) assert len(all_modules) == 4 assert str(SAMPLE / 'flake_fail.py') in all_modules