1
0

python 3.8: adapt to breaking changes re asyncio.CancelledError

(and TimeoutError)

closes #5798
This commit is contained in:
SomberNight
2019-12-11 23:07:47 +01:00
parent fa9b997c70
commit 308517d473
5 changed files with 13 additions and 7 deletions

View File

@@ -5,6 +5,8 @@ import os
from contextlib import contextmanager
from collections import defaultdict
import logging
import concurrent
from concurrent import futures
from electrum.network import Network
from electrum.ecc import ECPrivkey
@@ -236,7 +238,7 @@ class TestPeer(ElectrumTestCase):
gath = asyncio.gather(pay(), p1._message_loop(), p2._message_loop())
async def f():
await gath
with self.assertRaises(asyncio.CancelledError):
with self.assertRaises(concurrent.futures.CancelledError):
run(f())
def test_channel_usage_after_closing(self):