From 53cb5bf40f40cef2c5b4e05e7be42949146a3f58 Mon Sep 17 00:00:00 2001 From: Thomas Kriechbaumer Date: Sat, 28 Sep 2019 16:53:24 +0200 Subject: bump deps --- test/full_coverage_plugin.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/full_coverage_plugin.py') diff --git a/test/full_coverage_plugin.py b/test/full_coverage_plugin.py index ec30a9f9..f99dc7ab 100644 --- a/test/full_coverage_plugin.py +++ b/test/full_coverage_plugin.py @@ -55,7 +55,7 @@ def pytest_runtestloop(session): yield return - cov = pytest.config.pluginmanager.getplugin("_cov").cov_controller.cov + cov = session.config.pluginmanager.getplugin("_cov").cov_controller.cov if os.name == 'nt': cov.exclude('pragma: windows no cover') @@ -68,7 +68,7 @@ def pytest_runtestloop(session): yield - coverage_values = dict([(name, 0) for name in pytest.config.option.full_cov]) + coverage_values = dict([(name, 0) for name in session.config.option.full_cov]) prefix = os.getcwd() @@ -92,7 +92,7 @@ def pytest_runtestloop(session): coverage_passed = False -def pytest_terminal_summary(terminalreporter, exitstatus): +def pytest_terminal_summary(terminalreporter, exitstatus, config): global enable_coverage global coverage_values global coverage_passed @@ -119,7 +119,7 @@ def pytest_terminal_summary(terminalreporter, exitstatus): terminalreporter.write(msg, **markup) else: msg = 'SUCCESS: Full test coverage reached in modules and files:\n' - msg += '{}\n\n'.format('\n'.join(pytest.config.option.full_cov)) + msg += '{}\n\n'.format('\n'.join(config.option.full_cov)) terminalreporter.write(msg, green=True) msg = '\nExcluded files:\n' -- cgit v1.2.3 From ace79afefc7b9d8055a043a3a80d4cb8cee8a59e Mon Sep 17 00:00:00 2001 From: Thomas Kriechbaumer Date: Sat, 28 Sep 2019 19:52:18 +0200 Subject: bump more deps --- test/full_coverage_plugin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/full_coverage_plugin.py') diff --git a/test/full_coverage_plugin.py b/test/full_coverage_plugin.py index f99dc7ab..ab1206ea 100644 --- a/test/full_coverage_plugin.py +++ b/test/full_coverage_plugin.py @@ -31,8 +31,8 @@ def pytest_configure(config): global no_full_cov enable_coverage = ( - len(config.getoption('file_or_dir')) == 0 and - len(config.getoption('full_cov')) > 0 and + config.getoption('file_or_dir') and len(config.getoption('file_or_dir')) == 0 and + config.getoption('full_cov') and len(config.getoption('full_cov')) > 0 and config.pluginmanager.getplugin("_cov") is not None and config.pluginmanager.getplugin("_cov").cov_controller is not None and config.pluginmanager.getplugin("_cov").cov_controller.cov is not None -- cgit v1.2.3