aboutsummaryrefslogtreecommitdiffstats
path: root/test/full_coverage_plugin.py
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2017-02-17 23:29:10 +0100
committerMaximilian Hils <git@maximilianhils.com>2017-02-17 23:29:10 +0100
commit6a1e03ac6f5fbbfda70200d465cfb2f7cc01d253 (patch)
treea96ada079d2afdf778260390fdf3f22cfa3ea7cc /test/full_coverage_plugin.py
parent33acb48c71c26d0a54a2b4dafade07563b1be5c2 (diff)
downloadmitmproxy-6a1e03ac6f5fbbfda70200d465cfb2f7cc01d253.tar.gz
mitmproxy-6a1e03ac6f5fbbfda70200d465cfb2f7cc01d253.tar.bz2
mitmproxy-6a1e03ac6f5fbbfda70200d465cfb2f7cc01d253.zip
tests: make full cov plugin cwd-independent
Diffstat (limited to 'test/full_coverage_plugin.py')
-rw-r--r--test/full_coverage_plugin.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/full_coverage_plugin.py b/test/full_coverage_plugin.py
index e9951af9..d98c29d6 100644
--- a/test/full_coverage_plugin.py
+++ b/test/full_coverage_plugin.py
@@ -2,6 +2,8 @@ import os
import configparser
import pytest
+here = os.path.abspath(os.path.dirname(__file__))
+
enable_coverage = False
coverage_values = []
@@ -36,7 +38,7 @@ def pytest_configure(config):
)
c = configparser.ConfigParser()
- c.read('setup.cfg')
+ c.read(os.path.join(here, "..", "setup.cfg"))
fs = c['tool:full_coverage']['exclude'].split('\n')
no_full_cov = config.option.no_full_cov + [f.strip() for f in fs]