minor changes

This commit is contained in:
Thomas Kriechbaumer 2017-02-09 14:06:36 +01:00
parent 0299bb5b2e
commit 2ff5d72236
4 changed files with 13 additions and 3 deletions

View File

@ -70,4 +70,4 @@ def iterate(f):
yield "tcp_error", f
yield "tcp_end", f
else:
raise ValueError
raise TypeError()

View File

@ -3,5 +3,5 @@ VERSION = ".".join(str(i) for i in IVERSION)
PATHOD = "pathod " + VERSION
MITMPROXY = "mitmproxy " + VERSION
if __name__ == "__main__": # pragma: no cover
if __name__ == "__main__":
print(VERSION)

View File

@ -53,5 +53,5 @@ def test_tcp_flow(err):
def test_invalid():
with pytest.raises(ValueError):
with pytest.raises(TypeError):
next(eventsequence.iterate(42))

View File

@ -0,0 +1,10 @@
import runpy
from mitmproxy import version
def test_version(capsys):
runpy.run_module('mitmproxy.version', run_name='__main__')
stdout, stderr = capsys.readouterr()
assert len(stdout) > 0
assert stdout.strip() == version.VERSION