From: Bob Halley Date: Tue, 9 Jul 2024 14:11:42 +0000 (-0700) Subject: Fix the have_quic computation for test_doq X-Git-Tag: v2.7.0rc1~43 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8a22bafbf46325422c741a7d608184fdd8132ac9;p=thirdparty%2Fdnspython.git Fix the have_quic computation for test_doq 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. --- diff --git a/tests/test_doq.py b/tests/test_doq.py index d749d895..137ef77d 100644 --- a/tests/test_doq.py +++ b/tests/test_doq.py @@ -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