Skip to content

Commit

Permalink
Revert "testing: temporarily disable test due to hypothesis issue (py…
Browse files Browse the repository at this point in the history
…test-dev#11836)"

This reverts commit 5cd0535.
  • Loading branch information
bluetech authored and flying-sheep committed Apr 9, 2024
1 parent 8b8ad17 commit e847f21
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions testing/python/metafunc.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
from typing import Tuple
from typing import Union

import hypothesis
from hypothesis import strategies

from _pytest import fixtures
from _pytest import python
from _pytest.compat import getfuncargnames
Expand All @@ -26,10 +29,6 @@
import pytest


# import hypothesis
# from hypothesis import strategies


class TestMetafunc:
def Metafunc(self, func, config=None) -> python.Metafunc:
# The unit tests of this class check if things work correctly
Expand Down Expand Up @@ -294,15 +293,14 @@ class A:
assert metafunc._calls[2].id == "x1-a"
assert metafunc._calls[3].id == "x1-b"

# 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")
@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

0 comments on commit e847f21

Please sign in to comment.