fix(coverage): Ignore patches and dashboard from coverage report (#7685)

fix(coverage): Ignore patches and dashboard from coverage report
This commit is contained in:
Aditya Hase 2019-06-13 19:05:00 +05:30 committed by GitHub
commit 2797794de9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -441,7 +441,7 @@ def run_tests(context, app=None, module=None, doctype=None, test=(),
if coverage: if coverage:
# Generate coverage report only for app that is being tested # Generate coverage report only for app that is being tested
source_path = os.path.join(get_bench_path(), 'apps', app or 'frappe') source_path = os.path.join(get_bench_path(), 'apps', app or 'frappe')
cov = Coverage(source=[source_path], omit=['*.html', '*.js', '*.css']) cov = Coverage(source=[source_path], omit=['*.html', '*.js', '*.xml', '*.css', '*/doctype/*/*_dashboard.py', '*/patches/*'])
cov.start() cov.start()
ret = frappe.test_runner.main(app, module, doctype, context.verbose, tests=tests, ret = frappe.test_runner.main(app, module, doctype, context.verbose, tests=tests,