diff --git a/tests/test_all.py b/tests/test_all.py index 41aefc4..dd00323 100755 --- a/tests/test_all.py +++ b/tests/test_all.py @@ -569,7 +569,10 @@ def cb(result, errorno): # try encoding it as utf-8 self.channel.query(host.encode(), pycares.QUERY_TYPE_A, cb) self.wait() - self.assertEqual(self.errorno, pycares.errno.ARES_ENOTFOUND) + # ARES_EBADNAME correct for c-ares 1.24 and ARES_ENOTFOUND for 1.18 + if self.errorno == pycares.errno.ARES_ENOTFOUND: + 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) self.channel.query(host, pycares.QUERY_TYPE_A, cb)