Skip to content

Commit e085312

Browse files
committed
CI: use numpy printoptions in testing
1 parent 92b408f commit e085312

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/conftest.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
11
from functools import partial
22
import textwrap
3+
from packaging.version import Version
34

45
import pytest
6+
import numpy as np
7+
8+
9+
# Keep this until we require numpy to be >=2.0 or there is a directive in doctestplus
10+
# to support multiple ways of repr
11+
if Version(np.__version__) > Version("2.0.0.dev0+151"):
12+
np.set_printoptions(legacy="1.25")
513

614

715
def _wrap_docstring_in_func(func_name, docstring):

0 commit comments

Comments
 (0)