aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2015-08-30 15:59:50 +0200
committerMaximilian Hils <git@maximilianhils.com>2015-08-30 15:59:50 +0200
commit63ad4a4f5117d34ba6e9692eef1fc88f68b19c3d (patch)
treeee574d9a967214444fa023b110c2c5e16ae2e215
parenta86ec56012136664688fa4a8efcd866b5e3e17a8 (diff)
downloadmitmproxy-63ad4a4f5117d34ba6e9692eef1fc88f68b19c3d.tar.gz
mitmproxy-63ad4a4f5117d34ba6e9692eef1fc88f68b19c3d.tar.bz2
mitmproxy-63ad4a4f5117d34ba6e9692eef1fc88f68b19c3d.zip
coverage++
-rw-r--r--.coveragerc6
-rw-r--r--libmproxy/models/__init__.py4
-rw-r--r--libmproxy/protocol/base.py4
-rw-r--r--libmproxy/protocol/http.py2
4 files changed, 10 insertions, 6 deletions
diff --git a/.coveragerc b/.coveragerc
index 70ff48e7..fef1089b 100644
--- a/.coveragerc
+++ b/.coveragerc
@@ -1,6 +1,10 @@
-[rum]
+[run]
branch = True
[report]
omit = *contrib*, *tnetstring*, *platform*, *console*, *main.py
include = *libmproxy*
+exclude_lines =
+ pragma: nocover
+ pragma: no cover
+ raise NotImplementedError() \ No newline at end of file
diff --git a/libmproxy/models/__init__.py b/libmproxy/models/__init__.py
index 3947847c..a54f305f 100644
--- a/libmproxy/models/__init__.py
+++ b/libmproxy/models/__init__.py
@@ -8,8 +8,8 @@ from .connections import ClientConnection, ServerConnection
from .flow import Flow, Error
__all__ = [
- "HTTPFlow", "HTTPRequest", "HTTPResponse", "decoded"
- "make_error_response", "make_connect_request",
+ "HTTPFlow", "HTTPRequest", "HTTPResponse", "decoded",
+ "make_error_response", "make_connect_request",
"make_connect_response",
"ClientConnection", "ServerConnection",
"Flow", "Error",
diff --git a/libmproxy/protocol/base.py b/libmproxy/protocol/base.py
index d22a71c6..1c9b356c 100644
--- a/libmproxy/protocol/base.py
+++ b/libmproxy/protocol/base.py
@@ -43,7 +43,7 @@ class _LayerCodeCompletion(object):
Dummy class that provides type hinting in PyCharm, which simplifies development a lot.
"""
- def __init__(self, *args, **kwargs):
+ def __init__(self, *args, **kwargs): # pragma: nocover
super(_LayerCodeCompletion, self).__init__(*args, **kwargs)
if True:
return
@@ -70,7 +70,7 @@ class Layer(_LayerCodeCompletion):
Raises:
ProtocolException in case of protocol exceptions.
"""
- raise NotImplementedError
+ raise NotImplementedError()
def __getattr__(self, name):
"""
diff --git a/libmproxy/protocol/http.py b/libmproxy/protocol/http.py
index fc57f6df..345b3aa8 100644
--- a/libmproxy/protocol/http.py
+++ b/libmproxy/protocol/http.py
@@ -40,7 +40,7 @@ class _StreamingHttpLayer(_HttpLayer):
def read_response_body(self, headers, request_method, response_code, max_chunk_size=None):
raise NotImplementedError()
- yield "this is a generator"
+ yield "this is a generator" # pragma: no cover
def send_response_headers(self, response):
raise NotImplementedError