commit
07c09d8d9e
1
mypy.ini
1
mypy.ini
|
@ -9,6 +9,7 @@ disallow_any_generics = True
|
||||||
disallow_untyped_calls = True
|
disallow_untyped_calls = True
|
||||||
warn_redundant_casts = True
|
warn_redundant_casts = True
|
||||||
warn_unused_configs = True
|
warn_unused_configs = True
|
||||||
|
warn_unreachable = True
|
||||||
strict_equality = True
|
strict_equality = True
|
||||||
|
|
||||||
[mypy-libp2p.kademlia.*]
|
[mypy-libp2p.kademlia.*]
|
||||||
|
|
1
setup.py
1
setup.py
|
@ -16,6 +16,7 @@ extras_require = {
|
||||||
"black==19.3b0",
|
"black==19.3b0",
|
||||||
"isort==4.3.21",
|
"isort==4.3.21",
|
||||||
"flake8>=3.7.7,<4.0.0",
|
"flake8>=3.7.7,<4.0.0",
|
||||||
|
"flake8-bugbear",
|
||||||
],
|
],
|
||||||
"dev": ["tox>=3.13.2,<4.0.0", "docformatter"],
|
"dev": ["tox>=3.13.2,<4.0.0", "docformatter"],
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,7 @@ from typing import Any, List
|
||||||
import multiaddr
|
import multiaddr
|
||||||
from multiaddr import Multiaddr
|
from multiaddr import Multiaddr
|
||||||
from p2pclient import Client
|
from p2pclient import Client
|
||||||
|
import pytest
|
||||||
|
|
||||||
from libp2p.peer.id import ID
|
from libp2p.peer.id import ID
|
||||||
from libp2p.peer.peerinfo import PeerInfo, info_from_p2p_addr
|
from libp2p.peer.peerinfo import PeerInfo, info_from_p2p_addr
|
||||||
|
@ -32,7 +33,7 @@ async def try_until_success(coro_func, timeout=TIMEOUT_DURATION):
|
||||||
break
|
break
|
||||||
if (time.monotonic() - t_start) >= timeout:
|
if (time.monotonic() - t_start) >= timeout:
|
||||||
# timeout
|
# timeout
|
||||||
assert False, f"{coro_func} is still failing after `{timeout}` seconds"
|
pytest.fail(f"{coro_func} is still failing after `{timeout}` seconds")
|
||||||
await asyncio.sleep(0.01)
|
await asyncio.sleep(0.01)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user