Skip to content

Commit 0d758eb

Browse files
committed
Test reset_array_api_strict_flags()
1 parent b4bfb8d commit 0d758eb

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

array_api_strict/tests/test_flags.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,18 @@ def test_flags():
5050
api_version='2021.12',
5151
enabled_extensions=('linalg', 'fft')))
5252

53+
# Test resetting flags
54+
set_array_api_strict_flags(
55+
api_version='2021.12',
56+
data_dependent_shapes=False,
57+
enabled_extensions=())
58+
reset_array_api_strict_flags()
59+
flags = get_array_api_strict_flags()
60+
assert flags == {
61+
'api_version': '2022.12',
62+
'data_dependent_shapes': True,
63+
'enabled_extensions': ('linalg', 'fft'),
64+
}
5365

5466
def test_data_dependent_shapes():
5567
a = asarray([0, 0, 1, 2, 2])

0 commit comments

Comments
 (0)