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