|
10 | 10 | from astropy import units as u
|
11 | 11 | import numpy as np
|
12 | 12 | import pytest
|
13 |
| -from pyvo.dal.exceptions import DALOverflowWarning |
| 13 | +try: |
| 14 | + # This requires pyvo 1.4 |
| 15 | + from pyvo.dal.exceptions import DALOverflowWarning |
| 16 | +except ImportError: |
| 17 | + pass |
14 | 18 |
|
15 | 19 | from astroquery.exceptions import CorruptDataWarning
|
16 | 20 | from astroquery.utils.commons import ASTROPY_LT_4_1
|
@@ -49,6 +53,7 @@ def alma(request):
|
49 | 53 | @pytest.mark.remote_data
|
50 | 54 | class TestAlma:
|
51 | 55 | def test_public(self, alma):
|
| 56 | + # This warning was added in pyvo 1.4, but we don't test older versions with remote-data |
52 | 57 | with pytest.warns(expected_warning=DALOverflowWarning,
|
53 | 58 | match="Partial result set. Potential causes MAXREC, async storage space, etc."):
|
54 | 59 | results = alma.query(payload=None, public=True, maxrec=100)
|
@@ -84,6 +89,7 @@ def test_freq(self, alma):
|
84 | 89 | def test_bands(self, alma):
|
85 | 90 | payload = {'band_list': ['5', '7']}
|
86 | 91 | # Added maxrec here as downloading and reading the results take too long.
|
| 92 | + # This warning was added in pyvo 1.4, but we don't test older versions with remote-data |
87 | 93 | with pytest.warns(expected_warning=DALOverflowWarning,
|
88 | 94 | match="Partial result set. Potential causes MAXREC, async storage space, etc."):
|
89 | 95 | result = alma.query(payload, maxrec=1000)
|
|
0 commit comments