]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
Fix the have_quic computation for test_doq
authorBob Halley <halley@dnspython.org>
Tue, 9 Jul 2024 14:11:42 +0000 (07:11 -0700)
committerBob Halley <halley@dnspython.org>
Tue, 9 Jul 2024 14:11:42 +0000 (07:11 -0700)
The have_quic determination broke when we switched to the
improved nanonameserver, and if aioquic was not installed then
the test_doq tests would fail instead of being skipped.  We now
skip again in this situation.

tests/test_doq.py

index d749d8954c1af53d18549a3c1b4bfd0cb73f56e8..137ef77dc479a99561a66718206fc5439b2552ec 100644 (file)
@@ -5,6 +5,7 @@ import sys
 
 import pytest
 
+import dns._features
 import dns.asyncbackend
 import dns.asyncquery
 import dns.message
@@ -13,15 +14,14 @@ import dns.rcode
 
 from .util import have_ipv4, have_ipv6, here
 
-have_quic = False
+have_quic = dns._features.have("doq")
 try:
     from .nanonameserver import Server
-
-    have_quic = True
 except ImportError:
     pass
 
 if not have_quic:
+
     class Server(object):
         pass