Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.0.x] testing: temporarily disable test due to hypothesis issue #11837

Merged
merged 1 commit into from
Jan 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 12 additions & 11 deletions testing/python/metafunc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -27,6 +24,9 @@
from _pytest.python import IdMaker
from _pytest.scope import Scope

# import hypothesis
# from hypothesis import strategies


class TestMetafunc:
def Metafunc(self, func, config=None) -> python.Metafunc:
Expand Down Expand Up @@ -292,14 +292,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
Expand Down