mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-22 07:08:10 +00:00
fix test paths, move coverage config into setup.py
This commit is contained in:
parent
d33d3663ec
commit
20352f3453
11
.coveragerc
11
.coveragerc
@ -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()
|
@ -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):
|
||||
|
12
setup.cfg
12
setup.cfg
@ -10,3 +10,15 @@ ignore = E251
|
||||
[pytest]
|
||||
testpaths = test
|
||||
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()
|
||||
|
@ -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())
|
||||
|
Loading…
Reference in New Issue
Block a user