From: Bob Halley Date: Sat, 11 Jun 2022 19:29:35 +0000 (-0700) Subject: attempt to workaround curio exceptions that happen only in CI X-Git-Tag: v2.3.0rc1~67 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9ea69ddc3bc0d6a871cabf430fed3cc5f55f9f70;p=thirdparty%2Fdnspython.git attempt to workaround curio exceptions that happen only in CI --- diff --git a/tests/test_async.py b/tests/test_async.py index f40146e2..d6f188fe 100644 --- a/tests/test_async.py +++ b/tests/test_async.py @@ -559,13 +559,15 @@ try: sniff_result = "curio" def async_run(self, afunc): - return curio.run(afunc) + with curio.Kernel() as kernel: + return kernel.run(afunc, shutdown=True) class CurioNoSniffioAsyncDetectionTests(NoSniffioAsyncDetectionTests): expect_raise = True def async_run(self, afunc): - return curio.run(afunc) + with curio.Kernel() as kernel: + return kernel.run(afunc, shutdown=True) class CurioAsyncTests(AsyncTests): connect_udp = False @@ -574,7 +576,8 @@ try: self.backend = dns.asyncbackend.set_default_backend("curio") def async_run(self, afunc): - return curio.run(afunc) + with curio.Kernel() as kernel: + return kernel.run(afunc, shutdown=True) except ImportError: pass