1
0

tests: disable asyncio debug mode

see https://bugs.python.org/issue38608
This commit is contained in:
SomberNight
2023-02-20 16:47:12 +00:00
parent d4338fb503
commit 7aa1609718

View File

@@ -1,4 +1,5 @@
import asyncio
import os
import unittest
import threading
import tempfile
@@ -48,6 +49,12 @@ class ElectrumTestCase(unittest.IsolatedAsyncioTestCase):
super().setUp()
self.electrum_path = tempfile.mkdtemp()
async def asyncSetUp(self):
loop = util.get_asyncio_loop()
# IsolatedAsyncioTestCase creates event loops with debug=True, which makes the tests take ~4x time
if not (os.environ.get("PYTHONASYNCIODEBUG") or os.environ.get("PYTHONDEVMODE")):
loop.set_debug(False)
def tearDown(self):
shutil.rmtree(self.electrum_path)
super().tearDown()