This commit is contained in:
Maximilian Hils 2019-09-05 22:08:18 +02:00
parent ebfff8db76
commit e77f375186
6 changed files with 17 additions and 18 deletions

View File

@ -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:

View File

@ -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

View File

@ -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

View File

@ -88,7 +88,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",

View File

@ -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

View File

@ -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")