Skip to contentSkip to conversation

python3-attrs - turn deadline off?

DISCUSSION Richard Purdie 2 participants 2 messages Feb 29, 2024

lore
Share & tools
lore
#0 lore raw

I noticed this failures:

https://autobuilder.yoctoproject.org/typhoon/#/builders/82/builds/6139

which leads to:

http://autobuilder.yocto.io/pub/non-release/20240228-36/testresults/qemuarm64-ptest/python3-attrs.log

which says:

"""
Unreliable test timings! On an initial run, this test took 268.29ms, which exceeded the deadline of 200.00ms, but on a subsequent run it took 2.63 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.
"""

Is there a setting we should be considering?

Cheers,

Richard

#1 lore raw
Quoted 19 lines · Richard Purdie

I noticed this failures:

https://autobuilder.yoctoproject.org/typhoon/#/builders/82/builds/6139

which leads to:

http://autobuilder.yocto.io/pub/non-release/20240228-36/testresults/qemuarm64-ptest/python3-attrs.log

which says:

"""
Unreliable test timings! On an initial run, this test took 268.29ms, which exceeded the deadline of 200.00ms, but on a subsequent run it took 2.63 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.
"""

Quoted 1 line

This warning is coming from python3-hypothesis, and is totally no obvious

from the test case itself
https://github.com/python-attrs/attrs/blob/23.2.0/tests/test_make.py#L1318C1-L1337C24

    @given(integers(), booleans())
    def test_converter_factory_property(self, val, init):
        """
        Property tests for attributes with converter, and a factory default.
        """
        C = make_class(
            "C",
            {
                "y": attr.ib(),
                "x": attr.ib(
                    init=init,
                    default=Factory(lambda: val),
                    converter=lambda v: v + 1,
                ),
            },
        )
        c = C(2)

        assert c.x == val + 1
        assert c.y == 2

Related:
https://github.com/HypothesisWorks/hypothesis/issues/3713

Is there a setting we should be considering?

Quoted 16 lines

Cheers,

Richard

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#196420):
https://lists.openembedded.org/g/openembedded-core/message/196420
Mute This Topic: https://lists.openembedded.org/mt/104640034/924729
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-