Code Monkey home page Code Monkey logo

Comments (8)

kloczek avatar kloczek commented on July 24, 2024

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.

from pycares.

saghul avatar saghul commented on July 24, 2024
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?

from pycares.

kloczek avatar kloczek commented on July 24, 2024

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 😋

from pycares.

saghul avatar saghul commented on July 24, 2024

Fixed in #180

from pycares.

kloczek avatar kloczek commented on July 24, 2024

It would be good as well to rename that file to tests_.py to allow pytest automatically scan that file.

from pycares.

kloczek avatar kloczek commented on July 24, 2024

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 =================================================================

from pycares.

kloczek avatar kloczek commented on July 24, 2024

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 👍

from pycares.

saghul avatar saghul commented on July 24, 2024

Glad to hear that!

from pycares.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.