fix test paths, move coverage config into setup.py

This commit is contained in:
Maximilian Hils 2016-02-18 13:24:17 +01:00
parent d33d3663ec
commit 20352f3453
4 changed files with 15 additions and 14 deletions

View File

@ -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()

View File

@ -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):

View File

@ -9,4 +9,16 @@ ignore = E251
[pytest]
testpaths = test
addopts = --timeout 30 -s
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()

View File

@ -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())