Skip to content

Commit 86c26d8

Browse files
authored
fix: update test for invalid env var seed
1 parent 34302e2 commit 86c26d8

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

tests/tests_fabric/utilities/test_seed.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,9 @@ def test_correct_seed_with_environment_variable():
4747

4848
@mock.patch.dict(os.environ, {"PL_GLOBAL_SEED": "invalid"}, clear=True)
4949
def test_invalid_seed():
50-
"""Ensure that we still fix the seed even if an invalid seed is given."""
51-
with pytest.warns(UserWarning, match="Invalid seed found"):
50+
"""Ensure that a ValueError is raised if an invalid seed is given."""
51+
with pytest.raises(ValueError, match="Invalid seed specified"):
5252
seed = seed_everything()
53-
assert seed == 0
54-
5553

5654
@mock.patch.dict(os.environ, {}, clear=True)
5755
@pytest.mark.parametrize("seed", [10e9, -10e9])

0 commit comments

Comments
 (0)