Closed kloczek closed 1 year ago
BTW .. pytest by default scans tests_*py files so it would be good to change name of the tests/tests.py to allow automatically find units.
self.channel.query('_xmpp-server._tcp.google.com', pycares.QUERY_TYPE_SRV, cb)
This one can be fixed by changing the test to _xmpp-server._tcp.jabber.org
self.assertEqual(len(self.result), 11)
This can be fixed by changing the assert to check if the length is > 10.
Would you be interested in making a PR with the changes?
Sorry I'm busy right now fixing many other rpm packages however if you will create such PR I can quickly plug it into my build procedure to test it 😋
Fixed in #180
It would be good as well to rename that file to tests_
Just tested that commit and now all looks good. Thank you 👍
+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-pycares-4.2.2-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-pycares-4.2.2-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.16, pytest-7.2.0, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/pycares-pycares-4.2.2
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 13.27s =================================================================
Just tested 4.3.0 and now pytest is able to find units
+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-pycares-4.3.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-pycares-4.3.0-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.16, pytest-7.2.0, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/pycares-pycares-4.3.0
collected 54 items
tests/test_all.py ..................xx.........s.................x..xs.. [100%]
========================================================================= short test summary info ==========================================================================
SKIPPED [1] tests/test_all.py:430: ANY type does not work on Mac.
SKIPPED [1] tests/test_all.py:537: The site used for this test no longer returns a non-ascii SOA.
XFAIL tests/test_all.py::DNSTest::test_getnameinfo_ipv6 - reason:
XFAIL tests/test_all.py::DNSTest::test_getnameinfo_ipv6_ll - reason:
XFAIL tests/test_all.py::DNSTest::test_query_txt_bytes2 - reason:
XFAIL tests/test_all.py::DNSTest::test_query_txt_multiple_chunked_with_non_ascii_content - reason:
================================================================ 48 passed, 2 skipped, 4 xfailed in 13.33s =================================================================
Thank you 👍
Glad to hear that!
I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.
python3 -sBm build -w --no-isolation
build
with--no-isolation
I'm using during all processes only locally installed modulesHere is pytest output:
Here is list of installed modules in build env