tests: disable asyncio debug mode
see https://bugs.python.org/issue38608
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user