diff options
| author | Bob Halley <halley@dnspython.org> | 2022-06-11 12:29:35 -0700 |
|---|---|---|
| committer | Bob Halley <halley@dnspython.org> | 2022-06-11 12:29:35 -0700 |
| commit | 9ea69ddc3bc0d6a871cabf430fed3cc5f55f9f70 (patch) | |
| tree | a7f1ac9c731b3628111a0aede8b0a41dade4ea4d /tests/test_async.py | |
| parent | 7a03dd161f6ab0e42a09fbfa6864f2524f642d4f (diff) | |
| download | dnspython-9ea69ddc3bc0d6a871cabf430fed3cc5f55f9f70.tar.gz | |
attempt to workaround curio exceptions that happen only in CI
Diffstat (limited to 'tests/test_async.py')
| -rw-r--r-- | tests/test_async.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/test_async.py b/tests/test_async.py index f40146e..d6f188f 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 |
