diff options
author | Maximilian Hils <git@maximilianhils.com> | 2016-02-18 13:24:17 +0100 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2016-02-18 13:24:17 +0100 |
commit | 20352f3453dc99f5ba9c0d54e34c64653da94dbf (patch) | |
tree | 506dfe4540bad7c1c9954cf0b7ac27bc7eab0b33 | |
parent | d33d3663ecb166461d9cb5a78a29b44ee7a8fbb7 (diff) | |
download | mitmproxy-20352f3453dc99f5ba9c0d54e34c64653da94dbf.tar.gz mitmproxy-20352f3453dc99f5ba9c0d54e34c64653da94dbf.tar.bz2 mitmproxy-20352f3453dc99f5ba9c0d54e34c64653da94dbf.zip |
fix test paths, move coverage config into setup.py
-rw-r--r-- | .coveragerc | 11 | ||||
-rw-r--r-- | netlib/tutils.py | 2 | ||||
-rw-r--r-- | setup.cfg | 14 | ||||
-rw-r--r-- | test/mitmproxy/test_examples.py | 2 |
4 files changed, 15 insertions, 14 deletions
diff --git a/.coveragerc b/.coveragerc deleted file mode 100644 index b62409b6..00000000 --- a/.coveragerc +++ /dev/null @@ -1,11 +0,0 @@ -[run] -branch = True -include = mitmproxy netlib pathod -omit = *contrib*, *tnetstring*, *platform*, *console*, *main.py - -[report] -show_missing = True -exclude_lines = - pragma: nocover - pragma: no cover - raise NotImplementedError() diff --git a/netlib/tutils.py b/netlib/tutils.py index f6ce8e0a..18d632f0 100644 --- a/netlib/tutils.py +++ b/netlib/tutils.py @@ -92,7 +92,7 @@ class RaisesContext(object): test_data = utils.Data(__name__) # FIXME: Temporary workaround during repo merge. import os -test_data.dirname = os.path.join(test_data.dirname,"..","..","test","netlib") +test_data.dirname = os.path.join(test_data.dirname,"..","test","netlib") def treq(**kwargs): @@ -9,4 +9,16 @@ ignore = E251 [pytest] testpaths = test -addopts = --timeout 30 -s
\ No newline at end of file +addopts = --timeout 30 -s + +[coverage:run] +branch = True +include = mitmproxy netlib pathod +omit = *contrib*, *tnetstring*, *platform*, *console*, *main.py + +[coverage:report] +show_missing = True +exclude_lines = + pragma: nocover + pragma: no cover + raise NotImplementedError() diff --git a/test/mitmproxy/test_examples.py b/test/mitmproxy/test_examples.py index 54e6e753..163ace17 100644 --- a/test/mitmproxy/test_examples.py +++ b/test/mitmproxy/test_examples.py @@ -5,7 +5,7 @@ from . import tservers def test_load_scripts(): - example_dir = utils.Data("mitmproxy").path("../../examples") + example_dir = utils.Data(__name__).path("../../examples") scripts = glob.glob("%s/*.py" % example_dir) tmaster = tservers.TestMaster(config.ProxyConfig()) |