From 78f36831901efea32abada22a029aaeb0cfea1ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Brigitta=20Sip=C5=91cz?= Date: Tue, 12 Sep 2023 18:11:50 -0700 Subject: [PATCH] TST: fix toplevel conftest so pytest/tox on the toplevel picks up the printoption, too --- conftest.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/conftest.py b/conftest.py index 56293bf880..1ce60f20af 100644 --- a/conftest.py +++ b/conftest.py @@ -1,9 +1,17 @@ # Licensed under a 3-clause BSD style license - see LICENSE.rst +import numpy as np +from astropy.utils import minversion + from pytest_astropy_header.display import (PYTEST_HEADER_MODULES, TESTED_VERSIONS) +# Keep this until we require numpy to be >=2.0 +if minversion(np, "2.0.0.dev0+git20230726"): + np.set_printoptions(legacy="1.25") + + def pytest_configure(config): config.option.astropy_header = True