diff --git a/.coveragerc b/.coveragerc deleted file mode 100644 index b62409b60..000000000 --- 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 f6ce8e0a5..18d632f08 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): diff --git a/setup.cfg b/setup.cfg index 2155af3c5..60de7c523 100644 --- a/setup.cfg +++ b/setup.cfg @@ -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 54e6e753c..163ace170 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())