mirror of
https://github.com/Farama-Foundation/Gymnasium.git
synced 2025-08-18 21:06:59 +00:00
Py36+ code style in tests (#2547)
This commit is contained in:
@@ -42,7 +42,7 @@ def test_concatenate(space):
|
||||
assert_nested_equal(lhs[key], rhs_T_key, n)
|
||||
|
||||
else:
|
||||
raise TypeError("Got unknown type `{0}`.".format(type(lhs)))
|
||||
raise TypeError(f"Got unknown type `{type(lhs)}`.")
|
||||
|
||||
samples = [space.sample() for _ in range(8)]
|
||||
array = create_empty_array(space, n=8)
|
||||
@@ -76,7 +76,7 @@ def test_create_empty_array(space, n):
|
||||
assert_nested_type(arr[key], space.spaces[key], n)
|
||||
|
||||
else:
|
||||
raise TypeError("Got unknown type `{0}`.".format(type(arr)))
|
||||
raise TypeError(f"Got unknown type `{type(arr)}`.")
|
||||
|
||||
array = create_empty_array(space, n=n, fn=np.empty)
|
||||
assert_nested_type(array, space, n=n)
|
||||
@@ -107,7 +107,7 @@ def test_create_empty_array_zeros(space, n):
|
||||
assert_nested_type(arr[key], space.spaces[key], n)
|
||||
|
||||
else:
|
||||
raise TypeError("Got unknown type `{0}`.".format(type(arr)))
|
||||
raise TypeError(f"Got unknown type `{type(arr)}`.")
|
||||
|
||||
array = create_empty_array(space, n=n, fn=np.zeros)
|
||||
assert_nested_type(array, space, n=n)
|
||||
@@ -137,7 +137,7 @@ def test_create_empty_array_none_shape_ones(space):
|
||||
assert_nested_type(arr[key], space.spaces[key])
|
||||
|
||||
else:
|
||||
raise TypeError("Got unknown type `{0}`.".format(type(arr)))
|
||||
raise TypeError(f"Got unknown type `{type(arr)}`.")
|
||||
|
||||
array = create_empty_array(space, n=None, fn=np.ones)
|
||||
assert_nested_type(array, space)
|
||||
|
Reference in New Issue
Block a user