Skip to content

Commit 4ac4e0e

Browse files
authored
Merge pull request #2784 from bsipocz/test_workaround_new_np_repr
MAINT: add workaround for doctesting with new numpy repr
2 parents 86a7332 + 1c7a0bb commit 4ac4e0e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

astroquery/conftest.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
import os
33
from pathlib import Path
44

5+
from astropy.utils import minversion
6+
import numpy as np
57
import pytest
68
# this contains imports plugins that configure py.test for astropy tests.
79
# by importing them here in conftest.py they are discoverable by py.test
@@ -11,6 +13,11 @@
1113
TESTED_VERSIONS)
1214

1315

16+
# Keep this until we require numpy to be >=2.0
17+
if minversion(np, "2.0.0.dev0+151"):
18+
np.set_printoptions(legacy="1.25")
19+
20+
1421
def pytest_configure(config):
1522
config.option.astropy_header = True
1623

0 commit comments

Comments
 (0)