aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorThomas Kriechbaumer <thomas@kriechbaumer.name>2019-09-28 19:52:18 +0200
committerThomas Kriechbaumer <thomas@kriechbaumer.name>2019-09-28 23:29:13 +0200
commitace79afefc7b9d8055a043a3a80d4cb8cee8a59e (patch)
tree3be0b3bb4328600346bbbb6c98fd09234a780ac9 /test
parent33a2415f6c246220e039d42d51899c15b50b43ad (diff)
downloadmitmproxy-ace79afefc7b9d8055a043a3a80d4cb8cee8a59e.tar.gz
mitmproxy-ace79afefc7b9d8055a043a3a80d4cb8cee8a59e.tar.bz2
mitmproxy-ace79afefc7b9d8055a043a3a80d4cb8cee8a59e.zip
bump more deps
Diffstat (limited to 'test')
-rw-r--r--test/full_coverage_plugin.py4
-rwxr-xr-xtest/individual_coverage.py12
2 files changed, 8 insertions, 8 deletions
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
diff --git a/test/individual_coverage.py b/test/individual_coverage.py
index 097b290f..54180eac 100755
--- a/test/individual_coverage.py
+++ b/test/individual_coverage.py
@@ -19,29 +19,29 @@ def run_tests(src, test, fail):
e = pytest.main([
'-qq',
'--disable-pytest-warnings',
- '--no-faulthandler',
'--cov', src.replace('.py', '').replace('/', '.'),
'--cov-fail-under', '100',
'--cov-report', 'term-missing:skip-covered',
+ '-o', 'faulthandler_timeout=0',
test
])
if e == 0:
if fail:
- print("UNEXPECTED SUCCESS:", src, "Please remove this file from setup.cfg tool:individual_coverage/exclude.")
+ print("FAIL DUE TO UNEXPECTED SUCCESS:", src, "Please remove this file from setup.cfg tool:individual_coverage/exclude.")
e = 42
else:
- print("SUCCESS: ", src)
+ print("Success:", src)
else:
if fail:
- print("IGNORING FAIL: ", src)
+ print("Ignoring allowed fail:", src)
e = 0
else:
cov = [l for l in stdout.getvalue().split("\n") if (src in l) or ("was never imported" in l)]
if len(cov) == 1:
- print("FAIL: ", cov[0])
+ print("FAIL:", cov[0])
else:
- print("FAIL: ", src, test, stdout.getvalue(), stdout.getvalue())
+ print("FAIL:", src, test, stdout.getvalue(), stdout.getvalue())
print(stderr.getvalue())
print(stdout.getvalue())