def task_coverage(): """show coverage for all modules including tests""" cov = Coverage( [PythonPackage('import_deps', 'tests')], config={'branch':True,}, ) yield cov.all() # create task `coverage` yield cov.src() # create task `coverage_src`
def task_coverage(): """show coverage for all modules including tests""" cov = Coverage([PythonPackage('doit', 'tests')], config=Config(branch=False, parallel=True, omit=['tests/myecho.py', 'tests/sample_process.py'],) ) yield cov.all() yield cov.src() yield cov.by_module()
def task_coverage(): """show coverage for all modules including tests""" cov = Coverage([PythonPackage('doit', 'tests')], config=Config(branch=False, parallel=True, concurrency='multiprocessing', omit=['tests/myecho.py', 'tests/sample_process.py'],) ) yield cov.all() yield cov.src() yield cov.by_module()
def test_cover_src(self): pkg = PythonPackage(SAMPLE) cov = Coverage([pkg]) task = list(cov.src('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.src)) ]
def task_coverage(): cov = Coverage([PythonPackage('doitsys', test_path='tests')]) yield cov.all() yield cov.src() yield cov.by_module()
def task_coverage(): cov = Coverage([PythonModule('doitcmd.py', 'test_doitcmd.py')]) yield cov.all() yield cov.src()
def task_coverage(): cov = Coverage([PythonPackage('doitpy', test_path='tests')], config={'branch':False}) yield cov.all() yield cov.src() yield cov.by_module()
def task_coverage(): """show coverage for all modules including tests""" cov = Coverage([PythonPackage('pyreg', 'tests')]) yield cov.all() yield cov.src() yield cov.by_module()
def task_coverage(): cov = Coverage([PythonPackage('doitpy', test_path='tests')], config={'branch': False}) yield cov.all() yield cov.src() yield cov.by_module()