File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
tests/tests_fabric/utilities Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,18 @@ def test_out_of_bounds_seed(seed):
6060 seed_everything (seed )
6161
6262
63+ def test_seed_everything_accepts_valid_seed_argument ():
64+ """Ensure that seed_everything returns the provided valid seed."""
65+ seed_value = 45
66+ assert seed_everything (seed_value ) == seed_value
67+
68+
69+ @mock .patch .dict (os .environ , {"PL_GLOBAL_SEED" : "17" }, clear = True )
70+ def test_seed_everything_accepts_valid_seed_from_env ():
71+ """Ensure that seed_everything uses the valid seed from the PL_GLOBAL_SEED environment variable."""
72+ assert seed_everything () == 17
73+
74+
6375def test_reset_seed_no_op ():
6476 """Test that the reset_seed function is a no-op when seed_everything() was not used."""
6577 assert "PL_GLOBAL_SEED" not in os .environ
You can’t perform that action at this time.
0 commit comments