saghul / pycares

Python interface for c-ares
https://pypi.org/project/pycares/
MIT License
163 stars 74 forks source link

Failure in test_query_txt_bytes1 #66

Closed gvanem closed 5 years ago

gvanem commented 6 years ago

The test/test.py fails on test_query_txt_bytes1 since the domain like.com.ca does not longer exists:

FAIL: test_query_txt_bytes1 (__main__.DNSTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "F:\MingW32\src\inet\DNS\c-ares\PyCares\tests\tests.py", line 206, in test_query_txt_bytes1
    self.assertEqual(self.errorno, None)
AssertionError: 12 != None

12 == ARES_ETIMEOUT. But changing it to like.com, all seems okay:

--- a/tests/tests.py 2017-11-16 21:09:56
+++ b/tests/tests.py 2018-06-07 16:23:10
@@ -201,7 +201,7 @@
         self.result, self.errorno = None, None
         def cb(result, errorno):
             self.result, self.errorno = result, errorno
-        self.channel.query('like.com.sa', pycares.QUERY_TYPE_TXT, cb)
+        self.channel.query('like.com', pycares.QUERY_TYPE_TXT, cb)
         self.wait()
         self.assertEqual(self.errorno, None)
0mp commented 5 years ago

I can confirm that the test fails. I'm testing on FreeBSD 11.2.

saghul commented 5 years ago

Care to send a PR? I'm a bit busy these days, sorry..

0mp commented 5 years ago

I think it was fixed in 03e9320