aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.coveragerc11
-rw-r--r--netlib/tutils.py2
-rw-r--r--setup.cfg14
-rw-r--r--test/mitmproxy/test_examples.py2
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):
diff --git a/setup.cfg b/setup.cfg
index 2155af3c..60de7c52 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 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())