mirror of
https://github.com/Farama-Foundation/Gymnasium.git
synced 2025-08-22 07:02:19 +00:00
Update experimental wrappers (#176)
This commit is contained in:
@@ -112,10 +112,10 @@ def test_check_reset_seed(test, func: callable, message: str):
|
||||
with pytest.warns(
|
||||
UserWarning, match=f"^\\x1b\\[33mWARN: {re.escape(message)}\\x1b\\[0m$"
|
||||
):
|
||||
check_reset_seed(GenericTestEnv(reset_fn=func))
|
||||
check_reset_seed(GenericTestEnv(reset_func=func))
|
||||
else:
|
||||
with pytest.raises(test, match=f"^{re.escape(message)}$"):
|
||||
check_reset_seed(GenericTestEnv(reset_fn=func))
|
||||
check_reset_seed(GenericTestEnv(reset_func=func))
|
||||
|
||||
|
||||
def _deprecated_return_info(
|
||||
@@ -179,7 +179,7 @@ def test_check_reset_return_type(test, func: callable, message: str):
|
||||
"""Tests the check `env.reset()` function has a correct return type."""
|
||||
|
||||
with pytest.raises(test, match=f"^{re.escape(message)}$"):
|
||||
check_reset_return_type(GenericTestEnv(reset_fn=func))
|
||||
check_reset_return_type(GenericTestEnv(reset_func=func))
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
@@ -198,7 +198,7 @@ def test_check_reset_return_info_deprecation(test, func: callable, message: str)
|
||||
"""Tests that return_info has been correct deprecated as an argument to `env.reset()`."""
|
||||
|
||||
with pytest.warns(test, match=f"^\\x1b\\[33mWARN: {re.escape(message)}\\x1b\\[0m$"):
|
||||
check_reset_return_info_deprecation(GenericTestEnv(reset_fn=func))
|
||||
check_reset_return_info_deprecation(GenericTestEnv(reset_func=func))
|
||||
|
||||
|
||||
def test_check_seed_deprecation():
|
||||
@@ -236,7 +236,7 @@ def test_check_reset_options():
|
||||
"The `reset` method does not provide an `options` or `**kwargs` keyword argument"
|
||||
),
|
||||
):
|
||||
check_reset_options(GenericTestEnv(reset_fn=lambda self: (0, {})))
|
||||
check_reset_options(GenericTestEnv(reset_func=lambda self: (0, {})))
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
|
Reference in New Issue
Block a user