mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-23 00:01:36 +00:00
minor changes
This commit is contained in:
parent
0299bb5b2e
commit
2ff5d72236
@ -70,4 +70,4 @@ def iterate(f):
|
||||
yield "tcp_error", f
|
||||
yield "tcp_end", f
|
||||
else:
|
||||
raise ValueError
|
||||
raise TypeError()
|
||||
|
@ -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)
|
||||
|
@ -53,5 +53,5 @@ def test_tcp_flow(err):
|
||||
|
||||
|
||||
def test_invalid():
|
||||
with pytest.raises(ValueError):
|
||||
with pytest.raises(TypeError):
|
||||
next(eventsequence.iterate(42))
|
||||
|
10
test/mitmproxy/test_version.py
Normal file
10
test/mitmproxy/test_version.py
Normal 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
|
Loading…
Reference in New Issue
Block a user