From e0853124cb5d0f9c1e0dea54f8eb94c312641952 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Brigitta=20Sip=C5=91cz?= Date: Tue, 1 Aug 2023 10:40:17 -0700 Subject: [PATCH] CI: use numpy printoptions in testing --- tests/conftest.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/conftest.py b/tests/conftest.py index 1595c80..61cc694 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,7 +1,15 @@ from functools import partial import textwrap +from packaging.version import Version import pytest +import numpy as np + + +# Keep this until we require numpy to be >=2.0 or there is a directive in doctestplus +# to support multiple ways of repr +if Version(np.__version__) > Version("2.0.0.dev0+151"): + np.set_printoptions(legacy="1.25") def _wrap_docstring_in_func(func_name, docstring):