Skip to content

Commit

Permalink
Delenv on some tests that need it
Browse files Browse the repository at this point in the history
  • Loading branch information
DRMacIver committed Oct 31, 2024
1 parent 7c11cd9 commit 7d21980
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 0 additions & 1 deletion hypothesis-python/src/hypothesis/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1675,7 +1675,6 @@ def wrapped_test(*arguments, **kwargs):
# The exception caught here should either be an actual test
# failure (or BaseExceptionGroup), or some kind of fatal error
# that caused the engine to stop.

generated_seed = wrapped_test._hypothesis_internal_use_generated_seed
with local_settings(settings):
if not (state.failed_normally or generated_seed is None):
Expand Down
3 changes: 2 additions & 1 deletion hypothesis-python/tests/pytest/test_capture.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ def test_healthcheck_traceback_is_hidden(x):
"""


def test_healthcheck_traceback_is_hidden(testdir):
def test_healthcheck_traceback_is_hidden(testdir, monkeypatch):
monkeypatch.delenv("CI", raising=False)
script = testdir.makepyfile(TRACEBACKHIDE_HEALTHCHECK)
result = testdir.runpytest(script, "--verbose")
def_token = "__ test_healthcheck_traceback_is_hidden __"
Expand Down
5 changes: 4 additions & 1 deletion hypothesis-python/tests/pytest/test_seeding.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,10 @@ def test_failure(i):
"""


def test_repeats_healthcheck_when_following_seed_instruction(testdir, tmp_path):
def test_repeats_healthcheck_when_following_seed_instruction(
testdir, tmp_path, monkeypatch
):
monkeypatch.delenv("CI", raising=False)
health_check_test = HEALTH_CHECK_FAILURE.replace(
"<file>", repr(str(tmp_path / "seen"))
)
Expand Down

0 comments on commit 7d21980

Please sign in to comment.