Comments (5)
Closing.
Looks like latest 4.2.1 version no longer fails
+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-pycares-4.2.1-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-pycares-4.2.1-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra tests/tests.py
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.13, pytest-7.1.2, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/pycares-pycares-4.2.1
plugins: subtests-0.7.0, timeout-2.1.0
collected 54 items
tests/tests.py ..................xx.........s.................x..xs.. [100%]
========================================================================= short test summary info ==========================================================================
SKIPPED [1] tests/tests.py:430: ANY type does not work on Mac.
SKIPPED [1] tests/tests.py:537: The site used for this test no longer returns a non-ascii SOA.
XFAIL tests/tests.py::DNSTest::test_getnameinfo_ipv6
reason:
XFAIL tests/tests.py::DNSTest::test_getnameinfo_ipv6_ll
reason:
XFAIL tests/tests.py::DNSTest::test_query_txt_bytes2
reason:
XFAIL tests/tests.py::DNSTest::test_query_txt_multiple_chunked_with_non_ascii_content
reason:
================================================================ 48 passed, 2 skipped, 4 xfailed in 21.92s =================================================================
from pycares.
What c-ares version do you have in your system?
I'm not familiar with pytest.ini, what should go in there?
from pycares.
I'm using c-ares 1.18.1.
I'm not familiar with pytest.ini, what should go in there?
Firs it would be good to complete set of pytest parametrs which will be producing correct testtin (+ eventually some test suite corrections) than all cold be coded to pytest.ini to project.toml :)
from pycares.
Gentle ping ..
from pycares.
Just FTR.
New 4.2.0 still fails but in one unit less.
Here is pytest output:
+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-pycares-4.2.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-pycares-4.2.0-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra tests/tests.py
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.13, pytest-7.1.2, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/pycares-pycares-4.2.0
collected 54 items
tests/tests.py ........FFFFF.....xx.........s.................x..xs.. [100%]
================================================================================= FAILURES =================================================================================
_________________________________________________________________________ DNSTest.test_getaddrinfo _________________________________________________________________________
self = <tests.DNSTest testMethod=test_getaddrinfo>
@unittest.skipIf(sys.platform == 'win32', 'skipped on Windows')
def test_getaddrinfo(self):
self.result, self.errorno = None, None
def cb(result, errorno):
self.result, self.errorno = result, errorno
self.channel.getaddrinfo('localhost', 80, cb)
self.wait()
self.assertNoError(self.errorno)
> self.assertEqual(type(self.result), pycares.ares_addrinfo_result)
E AssertionError: <class 'NoneType'> != <class 'pycares.ares_addrinfo_result'>
tests/tests.py:52: AssertionError
________________________________________________________________________ DNSTest.test_getaddrinfo2 _________________________________________________________________________
self = <tests.DNSTest testMethod=test_getaddrinfo2>
@unittest.skipIf(sys.platform == 'win32', 'skipped on Windows')
def test_getaddrinfo2(self):
self.result, self.errorno = None, None
def cb(result, errorno):
self.result, self.errorno = result, errorno
self.channel.getaddrinfo('localhost', 'http', cb)
self.wait()
self.assertNoError(self.errorno)
> self.assertEqual(type(self.result), pycares.ares_addrinfo_result)
E AssertionError: <class 'NoneType'> != <class 'pycares.ares_addrinfo_result'>
tests/tests.py:65: AssertionError
________________________________________________________________________ DNSTest.test_getaddrinfo3 _________________________________________________________________________
self = <tests.DNSTest testMethod=test_getaddrinfo3>
@unittest.skipIf(sys.platform == 'win32', 'skipped on Windows')
def test_getaddrinfo3(self):
self.result, self.errorno = None, None
def cb(result, errorno):
self.result, self.errorno = result, errorno
self.channel.getaddrinfo('localhost', None, cb)
self.wait()
self.assertNoError(self.errorno)
> self.assertEqual(type(self.result), pycares.ares_addrinfo_result)
E AssertionError: <class 'NoneType'> != <class 'pycares.ares_addrinfo_result'>
tests/tests.py:78: AssertionError
________________________________________________________________________ DNSTest.test_getaddrinfo4 _________________________________________________________________________
self = <tests.DNSTest testMethod=test_getaddrinfo4>
@unittest.skipIf(sys.platform == 'win32', 'skipped on Windows')
def test_getaddrinfo4(self):
self.result, self.errorno = None, None
def cb(result, errorno):
self.result, self.errorno = result, errorno
self.channel.getaddrinfo('localhost', 'http', cb, family=socket.AF_INET)
self.wait()
self.assertNoError(self.errorno)
> self.assertEqual(type(self.result), pycares.ares_addrinfo_result)
E AssertionError: <class 'NoneType'> != <class 'pycares.ares_addrinfo_result'>
tests/tests.py:91: AssertionError
________________________________________________________________________ DNSTest.test_getaddrinfo5 _________________________________________________________________________
self = <tests.DNSTest testMethod=test_getaddrinfo5>
def test_getaddrinfo5(self):
self.result, self.errorno = None, None
def cb(result, errorno):
self.result, self.errorno = result, errorno
self.channel.getaddrinfo('google.com', 'http', cb)
self.wait()
self.assertNoError(self.errorno)
> self.assertEqual(type(self.result), pycares.ares_addrinfo_result)
E AssertionError: <class 'NoneType'> != <class 'pycares.ares_addrinfo_result'>
tests/tests.py:104: AssertionError
============================================================================= warnings summary =============================================================================
tests/tests.py::DNSTest::test_getaddrinfo
tests/tests.py::DNSTest::test_getaddrinfo2
tests/tests.py::DNSTest::test_getaddrinfo3
tests/tests.py::DNSTest::test_getaddrinfo4
tests/tests.py::DNSTest::test_getaddrinfo5
/usr/lib/python3.8/site-packages/_pytest/unraisableexception.py:78: PytestUnraisableExceptionWarning: Exception ignored from cffi callback <function _addrinfo_cb at 0x7fca20582ee0>: None
Traceback (most recent call last):
File "/home/tkloczko/rpmbuild/BUILDROOT/python-pycares-4.2.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages/pycares/__init__.py", line 162, in _addrinfo_cb
result = ares_addrinfo_result(res)
File "/home/tkloczko/rpmbuild/BUILDROOT/python-pycares-4.2.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages/pycares/__init__.py", line 841, in __init__
cname_ptr = ares_addrinfo.cnames
ffi.error: struct ares_addrinfo: wrong total size (cdef says 16, but C compiler says 24). fix it or use "...;" as the last field in the cdef for struct ares_addrinfo to make it flexible
warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
========================================================================= short test summary info ==========================================================================
SKIPPED [1] tests/tests.py:430: ANY type does not work on Mac.
SKIPPED [1] tests/tests.py:537: The site used for this test no longer returns a non-ascii SOA.
XFAIL tests/tests.py::DNSTest::test_getnameinfo_ipv6
reason:
XFAIL tests/tests.py::DNSTest::test_getnameinfo_ipv6_ll
reason:
XFAIL tests/tests.py::DNSTest::test_query_txt_bytes2
reason:
XFAIL tests/tests.py::DNSTest::test_query_txt_multiple_chunked_with_non_ascii_content
reason:
FAILED tests/tests.py::DNSTest::test_getaddrinfo - AssertionError: <class 'NoneType'> != <class 'pycares.ares_addrinfo_result'>
FAILED tests/tests.py::DNSTest::test_getaddrinfo2 - AssertionError: <class 'NoneType'> != <class 'pycares.ares_addrinfo_result'>
FAILED tests/tests.py::DNSTest::test_getaddrinfo3 - AssertionError: <class 'NoneType'> != <class 'pycares.ares_addrinfo_result'>
FAILED tests/tests.py::DNSTest::test_getaddrinfo4 - AssertionError: <class 'NoneType'> != <class 'pycares.ares_addrinfo_result'>
FAILED tests/tests.py::DNSTest::test_getaddrinfo5 - AssertionError: <class 'NoneType'> != <class 'pycares.ares_addrinfo_result'>
===================================================== 5 failed, 43 passed, 2 skipped, 4 xfailed, 5 warnings in 24.59s ======================================================
There are some warnings which could be used to improve test suite.
from pycares.
Related Issues (20)
- [GRAMMAR] pb in REAMDE.rst HOT 1
- HELP: looking for new maintainers HOT 8
- Add aarch64 wheel HOT 1
- Pycares requires gcc 4.2? HOT 1
- python tests/tests.py fail when test [email protected] HOT 5
- 4.0.0 Q: how to build pycares against system installed c-ares ? HOT 2
- deps/c-ares/src/lib/ares__close_sockets.c: No such file or directory HOT 3
- gethostbyname() does not appear to work with lookups="f"
- python3 setup.py build failed in [email protected] on centos8_aarch64 HOT 2
- CNAME answers to A request HOT 6
- pytest failed in [email protected] on centos8_aarch64 HOT 1
- Error FileNotFound when installing pycares==4.1.1 HOT 8
- `pycares.reverse_address` Import Error HOT 2
- Security vulnerability HOT 2
- 4.2.0: sphinx warnings `reference target not found` HOT 2
- 3.11 wheels HOT 2
- Can't build from sources on EL8 HOT 3
- 4.2.2: pytest is failing in two units HOT 8
- Fail to install on centos docker HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pycares.