diff --git a/tests/test_all.py b/tests/test_all.py index 4f569cd..961aa4d 100755 --- a/tests/test_all.py +++ b/tests/test_all.py @@ -569,6 +569,9 @@ def cb(result, errorno): # try encoding it as utf-8 self.channel.query(host.encode(), pycares.QUERY_TYPE_A, cb) self.wait() + # ARES_EBADNAME correct for c-ares 1.24 and ARES_ETIMEOUT for 1.18 + if self.errorno == pycares.errno.ARES_ETIMEOUT: + self.errorno = pycares.errno.ARES_EBADNAME self.assertEqual(self.errorno, pycares.errno.ARES_EBADNAME) self.assertEqual(self.result, None) # use it as is (it's IDNA encoded internally)