attwad/python-osc

1.7.6: Flaky test test_nto_to_system_time

dvzrv opened this issue · 3 comments

dvzrv commented

Hi! When packaging 1.7.6 for Arch Linux, I ran the test suite against the code base and ran into this test (sometimes) failing:

=================================== FAILURES ===================================
_______________________ TestNTP.test_nto_to_system_time ________________________

self = <pythonosc.test.parsing.test_ntp.TestNTP testMethod=test_nto_to_system_time>

    def test_nto_to_system_time(self):
        unix_time = time.time()
        timestamp = ntp.system_time_to_ntp(unix_time)
        unix_time2 = ntp.ntp_to_system_time(timestamp)
        self.assertTrue(type(unix_time) is float)
        self.assertTrue(type(timestamp) is bytes)
        self.assertTrue(type(unix_time2) is float)
>       self.assertEqual(round(unix_time, 6), round(unix_time2, 6))
E       AssertionError: 1622136058.727363 != 1622136058.727364

pythonosc/test/parsing/test_ntp.py:17: AssertionError
=============================== warnings summary ===============================
pythonosc/dispatcher.py:154
  /build/python-osc/src/python-osc-1.7.6/pythonosc/dispatcher.py:154: DeprecationWarning: invalid escape sequence \w
    pattern = pattern.replace('\\*', '[\w|\+]*')

-- Docs: https://docs.pytest.org/en/stable/warnings.html
=========================== short test summary info ============================
FAILED pythonosc/test/parsing/test_ntp.py::TestNTP::test_nto_to_system_time
=================== 1 failed, 114 passed, 1 warning in 0.20s ===================

This was fixed just after I packaged the 1.7.6, I can bump to 1.7.7 to include this.
a4086af

dvzrv commented

Thanks. Please also release this on pypi.org. Currently there's only the wheel: https://pypi.org/project/python-osc/#files

I added the sdist version now.