Update experimental wrappers (#176)

This commit is contained in:
Mark Towers
2022-12-05 19:14:56 +00:00
committed by GitHub
parent 1a381bcd0d
commit 848b7097bf
39 changed files with 1140 additions and 806 deletions

View File

@@ -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(