Skip to content

Commit 361b242

Browse files
committed
Use pytestmark in atomic remote tests
The individual `@pytest.mark.remote_data` decorators have been removed from `atomic` remote tests and are replaced with the `pytestmark` global variable. This serves as an example other sub-packages can follow.
1 parent 14cffa3 commit 361b242

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

astroquery/atomic/tests/test_atomic_remote.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66

77
from ...atomic import AtomicLineList
88

9+
pytestmark = pytest.mark.remote_data
10+
911

10-
@pytest.mark.remote_data
1112
def test_default_form_values():
1213
default_response = AtomicLineList._request(
1314
method="GET", url=AtomicLineList.FORM_URL,
@@ -28,7 +29,6 @@ def test_default_form_values():
2829
'wave': u'Angstrom'}
2930

3031

31-
@pytest.mark.remote_data
3232
def test_query_with_default_params():
3333
table = AtomicLineList.query_object(cache=False)
3434
assert isinstance(table, Table)
@@ -43,7 +43,6 @@ def test_query_with_default_params():
4343
1.02916 Zn XXX E1 1*-6* 1-6 1/2-* 1.33E+12 0.00 - 97174700.00'''.strip()
4444

4545

46-
@pytest.mark.remote_data
4746
def test_query_with_wavelength_params():
4847
result = AtomicLineList.query_object(
4948
wavelength_range=(15 * u.nm, 200 * u.Angstrom),
@@ -66,15 +65,13 @@ def test_query_with_wavelength_params():
6665
'0.00 - 502481.80']))
6766

6867

69-
@pytest.mark.remote_data
7068
def test_empty_result_set():
7169
result = AtomicLineList.query_object(wavelength_accuracy=0, cache=False)
7270
assert isinstance(result, Table)
7371
assert not result
7472
assert len(result) == 0
7573

7674

77-
@pytest.mark.remote_data
7875
def test_lower_upper_ranges():
7976
result = AtomicLineList.query_object(
8077
lower_level_energy_range=u.Quantity((600 * u.cm**(-1), 1000 * u.cm**(-1))),

0 commit comments

Comments
 (0)