From af2cf2b46ba38deb574fed4d919a51fb25875852 Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Wed, 17 Jan 2024 22:35:57 +0200 Subject: [PATCH 1/2] testing: temporarily disable test due to hypothesis issue Ref: https://github.com/pytest-dev/pytest/pull/11825#issuecomment-1894094641 --- testing/python/metafunc.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/testing/python/metafunc.py b/testing/python/metafunc.py index 9768c82ffa7..d5b648fde98 100644 --- a/testing/python/metafunc.py +++ b/testing/python/metafunc.py @@ -13,9 +13,6 @@ from typing import Tuple from typing import Union -import hypothesis -from hypothesis import strategies - import pytest from _pytest import fixtures from _pytest import python @@ -26,6 +23,8 @@ from _pytest.python import Function from _pytest.python import IdMaker from _pytest.scope import Scope +# import hypothesis +# from hypothesis import strategies class TestMetafunc: @@ -292,14 +291,15 @@ class A: assert metafunc._calls[2].id == "x1-a" assert metafunc._calls[3].id == "x1-b" - @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) -> None: - escaped = IdMaker([], [], None, None, None, None, None)._idval(value, "a", 6) - assert isinstance(escaped, str) - escaped.encode("ascii") + # TODO: Uncomment - https://github.com/HypothesisWorks/hypothesis/pull/3849 + # @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) -> None: + # escaped = IdMaker([], [], None, None, None, None, None)._idval(value, "a", 6) + # assert isinstance(escaped, str) + # escaped.encode("ascii") def test_unicode_idval(self) -> None: """Test that Unicode strings outside the ASCII character set get From 8d7d14d8972ab9323d01a46313550d4a982e00f2 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 17 Jan 2024 20:39:41 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- testing/python/metafunc.py | 1 + 1 file changed, 1 insertion(+) diff --git a/testing/python/metafunc.py b/testing/python/metafunc.py index d5b648fde98..9393c972746 100644 --- a/testing/python/metafunc.py +++ b/testing/python/metafunc.py @@ -23,6 +23,7 @@ from _pytest.python import Function from _pytest.python import IdMaker from _pytest.scope import Scope + # import hypothesis # from hypothesis import strategies