Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 935501 - dev-python/tenacity-8.4.2 fails tests on alpha: AssertionError: 5 not less than 1.1
Summary: dev-python/tenacity-8.4.2 fails tests on alpha: AssertionError: 5 not less th...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: Alpha Linux
: Normal normal
Assignee: Matthew Thode ( prometheanfire )
URL:
Whiteboard:
Keywords: TESTFAILURE
Depends on:
Blocks:
 
Reported: 2024-07-04 20:21 UTC by matoro
Modified: 2024-07-05 19:02 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log and emerge --info (file_935501.txt,36.45 KB, text/plain)
2024-07-04 20:21 UTC, matoro
Details

Note You need to log in before you can comment on or make changes to this bug.
Description matoro archtester 2024-07-04 20:21:01 UTC
Created attachment 896980 [details]
build.log and emerge --info

This test looks to be measuring absolute time elapsed, which is generally fragile especially given the slowness + low clock resolution here.

====================================================== FAILURES =======================================================
___________________________________________ TestContextManager.test_sleeps ____________________________________________

self = <tests.test_asyncio.TestContextManager testMethod=test_sleeps>

    @asynctest
    async def test_sleeps(self):
        start = current_time_ms()
        try:
            async for attempt in tasyncio.AsyncRetrying(
                stop=stop_after_attempt(1), wait=wait_fixed(1)
            ):
                with attempt:
                    raise Exception()
        except RetryError:
            pass
        t = current_time_ms() - start
>       self.assertLess(t, 1.1)
E       AssertionError: 5 not less than 1.1

attempt    = <tenacity.AttemptManager object at 0x200034aa7e0>
self       = <tests.test_asyncio.TestContextManager testMethod=test_sleeps>
start      = 1720049389590
t          = 5

tests/test_asyncio.py:206: AssertionError
================================================== warnings summary ===================================================
tests/test_asyncio.py::TestAsyncio::test_attempt_number_is_correct_for_interleaved_coroutines
  /var/tmp/portage/dev-python/tenacity-8.4.2/work/tenacity-8.4.2/tests/test_asyncio.py:42: DeprecationWarning: There is no current event loop
    loop = asyncio.get_event_loop()

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=============================================== short test summary info ===============================================
SKIPPED [1] tests/test_asyncio.py:150: trio not installed
FAILED tests/test_asyncio.py::TestContextManager::test_sleeps - AssertionError: 5 not less than 1.1
================================ 1 failed, 120 passed, 1 skipped, 1 warning in 24.35s =================================
Comment 1 Larry the Git Cow gentoo-dev 2024-07-05 19:02:37 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=45f67db1ec35bb72db516e25879dacff65086d70

commit 45f67db1ec35bb72db516e25879dacff65086d70
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2024-07-05 19:01:40 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2024-07-05 19:02:34 +0000

    dev-python/tenacity: Deselect a fragile test
    
    Closes: https://bugs.gentoo.org/935501
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 dev-python/tenacity/tenacity-8.4.2.ebuild | 4 ++++
 dev-python/tenacity/tenacity-8.5.0.ebuild | 5 +++++
 2 files changed, 9 insertions(+)