Merge pull request #372 from ralexstokes/add-py36-compatibility

Add py36 compatibility
This commit is contained in:
Alex Stokes
2019-12-10 17:28:49 -08:00
committed by GitHub
11 changed files with 60 additions and 54 deletions

View File

@ -58,11 +58,11 @@ async def test_peers_subscribe(pubsubs_fsub):
await connect(pubsubs_fsub[0].host, pubsubs_fsub[1].host)
await pubsubs_fsub[0].subscribe(TESTING_TOPIC)
# Yield to let 0 notify 1
await asyncio.sleep(0.1)
await asyncio.sleep(1)
assert pubsubs_fsub[0].my_id in pubsubs_fsub[1].peer_topics[TESTING_TOPIC]
await pubsubs_fsub[0].unsubscribe(TESTING_TOPIC)
# Yield to let 0 notify 1
await asyncio.sleep(0.1)
await asyncio.sleep(1)
assert pubsubs_fsub[0].my_id not in pubsubs_fsub[1].peer_topics[TESTING_TOPIC]

View File

@ -76,8 +76,8 @@ async def test_create_secure_session():
local_conn = InMemoryConnection(local_peer, is_initiator=True)
remote_conn = InMemoryConnection(remote_peer)
local_pipe_task = asyncio.create_task(create_pipe(local_conn, remote_conn))
remote_pipe_task = asyncio.create_task(create_pipe(remote_conn, local_conn))
local_pipe_task = asyncio.ensure_future(create_pipe(local_conn, remote_conn))
remote_pipe_task = asyncio.ensure_future(create_pipe(remote_conn, local_conn))
local_session_builder = create_secure_session(
local_nonce, local_peer, local_key_pair.private_key, local_conn, remote_peer