Skip to content

test_idval_hypothesis flaky on Windows #3707

@nicoddemus

Description

@nicoddemus

This test fails on occasion on AppVeyor

_____________________ TestMetafunc.test_idval_hypothesis ______________________
[gw0] win32 -- Python 3.6.6 c:\projects\pytest\.tox\py36-xdist\scripts\python.exe
self = <metafunc.TestMetafunc object at 0x05415A50>
    @hypothesis.given(strategies.text() | strategies.binary())
>   @hypothesis.settings(
        deadline=400.0
    )  # very close to std deadline and CI boxes are not reliable in CPU power
    def test_idval_hypothesis(self, value):
C:\projects\pytest\testing\python\metafunc.py:212: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
c:\projects\pytest\.tox\py36-xdist\lib\site-packages\hypothesis\core.py:632: in execute
    ) % (test.__name__, text_repr[0],))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <hypothesis.core.StateForActualGivenExecution object at 0x05415C70>
message = "Hypothesis test_idval_hypothesis(self=<metafunc.TestMetafunc at 0x5415a50>, value='') produces unreliable results: Falsified on the first call but did not on a subsequent one"
    def __flaky(self, message):
        if len(self.falsifying_examples) <= 1:
>           raise Flaky(message)
E           hypothesis.errors.Flaky: Hypothesis test_idval_hypothesis(self=<metafunc.TestMetafunc at 0x5415a50>, value='') produces unreliable results: Falsified on the first call but did not on a subsequent one
c:\projects\pytest\.tox\py36-xdist\lib\site-packages\hypothesis\core.py:891: Flaky
--------------------------------- Hypothesis ----------------------------------
Falsifying example: test_idval_hypothesis(self=<metafunc.TestMetafunc at 0x5415a50>, value='')
Unreliable test timings! On an initial run, this test took 734.00ms, which exceeded the deadline of 400.00ms, but on a subsequent run it took 0.00 ms, which did not. If you expect this sort of variability in your test timings, consider turning deadlines off for this test by setting deadline=None.
You can reproduce this example by temporarily adding @reproduce_failure('3.66.5', b'AAAA') as a decorator on your test case

Job link: https://ci.appveyor.com/project/pytestbot/pytest/build/1.0.4742/job/d05n0vp8mjbfrp9r

Metadata

Metadata

Assignees

Labels

platform: windowswindows platform-specific problemtype: infrastructureimprovement to development/releases/CI structure

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions