Skip to content

Commit b4bfb8d

Browse files
committed
Move the reset_flags fixture to be global to all the tests
1 parent 319799e commit b4bfb8d

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

array_api_strict/tests/conftest.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
from .._flags import reset_array_api_strict_flags
2+
3+
import pytest
4+
5+
@pytest.fixture(autouse=True)
6+
def reset_flags():
7+
reset_array_api_strict_flags()
8+
yield
9+
reset_array_api_strict_flags()

array_api_strict/tests/test_flags.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,6 @@
88

99
import pytest
1010

11-
@pytest.fixture(autouse=True)
12-
def reset_flags():
13-
reset_array_api_strict_flags()
14-
yield
15-
reset_array_api_strict_flags()
16-
1711
def test_flags():
1812
# Test defaults
1913
flags = get_array_api_strict_flags()

0 commit comments

Comments
 (0)