mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-22 07:08:10 +00:00
commit
a08c22dcdd
@ -52,7 +52,6 @@ matrix:
|
||||
- wget https://github.com/gohugoio/hugo/releases/download/v0.41/hugo_0.41_Linux-64bit.deb
|
||||
- sudo dpkg -i hugo*.deb
|
||||
- pip install tox virtualenv setuptools
|
||||
- pyenv global system 3.6
|
||||
script:
|
||||
- tox
|
||||
after_success:
|
||||
|
@ -37,7 +37,7 @@ class View:
|
||||
|
||||
def format_pairs(
|
||||
items: typing.Iterable[typing.Tuple[TTextType, TTextType]]
|
||||
)-> typing.Iterator[TViewLine]:
|
||||
) -> typing.Iterator[TViewLine]:
|
||||
|
||||
"""
|
||||
Helper function that accepts a list of (k,v) pairs into a list of
|
||||
|
@ -54,7 +54,7 @@ def parse_gif(data: bytes) -> Metadata:
|
||||
entries = block.body.body.entries
|
||||
for entry in entries:
|
||||
comment = entry.bytes
|
||||
if comment is not b'':
|
||||
if comment != b'':
|
||||
parts.append(('comment', str(comment)))
|
||||
return parts
|
||||
|
||||
|
2
setup.py
2
setup.py
@ -89,7 +89,7 @@ setup(
|
||||
],
|
||||
'dev': [
|
||||
"asynctest>=0.12.0",
|
||||
"flake8>=3.5,<3.7",
|
||||
"flake8>=3.5,<=3.7.8",
|
||||
"Flask>=1.0,<1.1",
|
||||
"mypy>=0.590,<0.591",
|
||||
"parver>=0.1,<2.0",
|
||||
|
@ -471,7 +471,7 @@ def test_focus():
|
||||
v = view.View()
|
||||
v.add([tft()])
|
||||
f = view.Focus(v)
|
||||
assert f.index is 0
|
||||
assert f.index == 0
|
||||
assert f.flow is v[0]
|
||||
|
||||
# Start empty
|
||||
|
@ -43,17 +43,17 @@ class TestConcurrent(tservers.MasterTest):
|
||||
assert await tctx.master.await_log("decorator not supported")
|
||||
|
||||
def test_concurrent_class(self, tdata):
|
||||
with taddons.context() as tctx:
|
||||
sc = tctx.script(
|
||||
tdata.path(
|
||||
"mitmproxy/data/addonscripts/concurrent_decorator_class.py"
|
||||
)
|
||||
with taddons.context() as tctx:
|
||||
sc = tctx.script(
|
||||
tdata.path(
|
||||
"mitmproxy/data/addonscripts/concurrent_decorator_class.py"
|
||||
)
|
||||
f1, f2 = tflow.tflow(), tflow.tflow()
|
||||
tctx.cycle(sc, f1)
|
||||
tctx.cycle(sc, f2)
|
||||
start = time.time()
|
||||
while time.time() - start < 5:
|
||||
if f1.reply.state == f2.reply.state == "committed":
|
||||
return
|
||||
raise ValueError("Script never acked")
|
||||
)
|
||||
f1, f2 = tflow.tflow(), tflow.tflow()
|
||||
tctx.cycle(sc, f1)
|
||||
tctx.cycle(sc, f2)
|
||||
start = time.time()
|
||||
while time.time() - start < 5:
|
||||
if f1.reply.state == f2.reply.state == "committed":
|
||||
return
|
||||
raise ValueError("Script never acked")
|
||||
|
Loading…
Reference in New Issue
Block a user