This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients vstinner
Date 2019-03-28.01:54:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1553738093.66.0.485436393765.issue36454@roundup.psfhosted.org>
In-reply-to
Content
AMD64 FreeBSD 10-STABLE Non-Debug 3.7:
https://buildbot.python.org/all/#/builders/170/builds/354

======================================================================
FAIL: test_monotonic (test.test_time.TimeTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/home/buildbot/python/3.7.koobs-freebsd10.nondebug/build/Lib/test/test_time.py", line 474, in test_monotonic
    self.assertTrue(0.45 <= dt <= 1.0, dt)
AssertionError: False is not true : 1.0372954378835857

Extract of the test:

    def test_monotonic(self):
        ...

        # monotonic() includes time elapsed during a sleep
        t1 = time.monotonic()
        time.sleep(0.5)
        t2 = time.monotonic()
        dt = t2 - t1
        self.assertGreater(t2, t1)
        # Issue #20101: On some Windows machines, dt may be slightly low
        self.assertTrue(0.45 <= dt <= 1.0, dt)

        ...

IMHO the test is too strict. It should not test the maximum value of dt, only the minimum.
History
Date User Action Args
2019-03-28 01:54:53vstinnersetrecipients: + vstinner
2019-03-28 01:54:53vstinnersetmessageid: <1553738093.66.0.485436393765.issue36454@roundup.psfhosted.org>
2019-03-28 01:54:53vstinnerlinkissue36454 messages
2019-03-28 01:54:53vstinnercreate