Skip to content

Commit c5f1bb0

Browse files
committed
fix(doctest): Set legacy printoptions
1 parent 5d9e666 commit c5f1bb0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

niworkflows/conftest.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,14 @@ def find_resource_or_skip(resource):
4848
return pathlike
4949

5050

51+
@pytest.fixture(scope="session", autouse=True)
52+
def legacy_printoptions():
53+
from packaging.version import Version
54+
55+
if Version(np.__version__) >= Version("1.22"):
56+
np.set_printoptions(legacy="1.21")
57+
58+
5159
@pytest.fixture(autouse=True)
5260
def add_np(doctest_namespace):
5361
from .utils.bids import collect_data

0 commit comments

Comments
 (0)