From 768f28f5a2c256f3c5d6ec8efc21bb2e68c3ed7b Mon Sep 17 00:00:00 2001 From: Aditya Hase Date: Fri, 14 Sep 2018 15:48:56 +0530 Subject: [PATCH] Report coverage on unexecuted files as well keyword argument `include` doesn't seem to report on unexecuted files coverage.py documentation claims using `source` instead will do just that --- frappe/commands/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frappe/commands/utils.py b/frappe/commands/utils.py index 0d955d58fd..e76e68e64c 100644 --- a/frappe/commands/utils.py +++ b/frappe/commands/utils.py @@ -397,8 +397,8 @@ def run_tests(context, app=None, module=None, doctype=None, test=(), if coverage: # Generate coverage report only for app that is being tested - source_path = os.path.join(get_bench_path(), 'apps', app or 'frappe', '*') - cov = Coverage(include=source_path, omit=['*.html', '*.js', '*.css']) + source_path = os.path.join(get_bench_path(), 'apps', app or 'frappe') + cov = Coverage(source=[source_path], omit=['*.html', '*.js', '*.css']) cov.start() ret = frappe.test_runner.main(app, module, doctype, context.verbose, tests=tests,