saghul / pycares

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

pytest failed in pycares@4.0.0 on centos8_aarch64 #163

Closed Tom-python0121 closed 2 years ago

Tom-python0121 commented 2 years ago

Hello,I meet a problem:pytest failed in pycares@4.0.0 on centos8_aarch64

Steps to reproduce the issue

cmd:python tests/tests.py
error:
===================================================================================================== FAILURES =====================================================================================================
__________________________________________________________________________________________ DNSTest.test_custom_resolvconf __________________________________________________________________________________________
[gw6] linux -- Python 3.8.8 /home/spack/opt/spack/linux-debian10-aarch64/gcc-8.3.0/python-3.8.8-2teergbqi4xrvcbwruvpqsga4v5osokp/bin/python3.8

self = <tests.DNSTest testMethod=test_custom_resolvconf>

    @unittest.skipIf(sys.platform == 'win32', 'skipped on Windows')
    def test_custom_resolvconf(self):
        self.result, self.errorno = None, None
        def cb(result, errorno):
            self.result, self.errorno = result, errorno
        self.channel = pycares.Channel(tries=1, timeout=2.0, resolvconf_path=os.path.join(FIXTURES_PATH, 'badresolv.conf'))
        self.channel.query('google.com', pycares.QUERY_TYPE_A, cb)
        self.wait()
        self.assertEqual(self.result, None)
>       self.assertEqual(self.errorno, pycares.errno.ARES_ETIMEOUT)
E       AssertionError: 11 != 12

tests/tests.py:620: AssertionError
============================================================================================= short test summary info ==============================================================================================
FAILED tests/tests.py::DNSTest::test_custom_resolvconf - AssertionError: 11 != 12

There are many test bugs. Can you help fix these bugs?This error is also reported on CentOS6_x86_64.

saghul commented 2 years ago

Tests rely on the runtime environment alas, so I'm only considering actual failures those that fail on the CI.