aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2016-06-02 14:44:06 +1200
committerAldo Cortesi <aldo@nullcube.com>2016-06-02 14:44:06 +1200
commitffca395e48d3909c9f588767978d128c1a6529d5 (patch)
tree1ab022e294df0843eccc2389bf2f326594e93f73
parent07f7905f9182ad0098a5a2e37d40ce9b27298380 (diff)
downloadmitmproxy-ffca395e48d3909c9f588767978d128c1a6529d5.tar.gz
mitmproxy-ffca395e48d3909c9f588767978d128c1a6529d5.tar.bz2
mitmproxy-ffca395e48d3909c9f588767978d128c1a6529d5.zip
Honesty in testing
- Don't skip tests that fail - Don't omit console from coverage I'm working on the pathod races, and can't seem to reproduce the failures locally. Also, let's not kid ourselves about the console coverage - it should be tracked. To improve it, we should measure it. Regressions in coverage of the module should be flagged by CI.
-rw-r--r--setup.cfg3
-rw-r--r--test/pathod/test_pathod.py5
2 files changed, 1 insertions, 7 deletions
diff --git a/setup.cfg b/setup.cfg
index e83ca0ab..eeaac0c8 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -11,8 +11,7 @@ addopts = --capture=no
[coverage:run]
branch = True
-include = *mitmproxy*, *netlib*, *pathod*
-omit = *contrib*, *tnetstring*, *platform*, *console*, *main.py
+omit = *contrib*, *tnetstring*, *platform*, *main.py
[coverage:report]
show_missing = True
diff --git a/test/pathod/test_pathod.py b/test/pathod/test_pathod.py
index 4d969158..5773a3c9 100644
--- a/test/pathod/test_pathod.py
+++ b/test/pathod/test_pathod.py
@@ -1,5 +1,4 @@
from six.moves import cStringIO as StringIO
-import pytest
from pathod import pathod, version
from netlib import tcp
@@ -129,7 +128,6 @@ class CommonTests(tutils.DaemonTests):
assert self.d.last_log()
# FIXME: Other binary data elements
- @pytest.mark.skip(reason="race condition")
def test_sizelimit(self):
r = self.get("200:b@1g")
assert r.status_code == 800
@@ -143,7 +141,6 @@ class CommonTests(tutils.DaemonTests):
def test_info(self):
assert tuple(self.d.info()["version"]) == version.IVERSION
- @pytest.mark.skip(reason="race condition")
def test_logs(self):
assert self.d.clear_log()
assert not self.d.last_log()
@@ -223,7 +220,6 @@ class CommonTests(tutils.DaemonTests):
)
assert r[1].payload == "test"
- @pytest.mark.skip(reason="race condition")
def test_websocket_frame_reflect_error(self):
r, _ = self.pathoc(
["ws:/p/", "wf:-mask:knone:f'wf:b@10':i13,'a'"],
@@ -233,7 +229,6 @@ class CommonTests(tutils.DaemonTests):
# FIXME: Race Condition?
assert "Parse error" in self.d.text_log()
- @pytest.mark.skip(reason="race condition")
def test_websocket_frame_disconnect_error(self):
self.pathoc(["ws:/p/", "wf:b@10:d3"], ws_read_limit=0)
assert self.d.last_log()