Skip to content

Commit 0a7cf0e

Browse files
authored
Merge pull request #787 from bsipocz/vamdc_minor_cleanup
vamdc test cleanup
2 parents eb99253 + ec098fb commit 0a7cf0e

File tree

3 files changed

+27
-83
lines changed

3 files changed

+27
-83
lines changed

astroquery/vamdc/tests/test_module.py

Lines changed: 0 additions & 82 deletions
This file was deleted.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Licensed under a 3-clause BSD style license - see LICENSE.rst
2+
from __future__ import print_function
3+
4+
import os
5+
6+
from ... import vamdc
7+
8+
9+
def data_path(filename):
10+
data_dir = os.path.join(os.path.dirname(__file__), 'data')
11+
return os.path.join(data_dir, filename)
12+
13+
14+
# finally test the methods using the mock HTTP response
15+
#def test_query_molecule(patch_request):
16+
# ch3oh = vamdc.core.VamdcClass().query_molecule('CH3OH')
17+
# assert 'SCDMS-2369983' in ch3oh.data['States']
18+
19+
# similarly fill in tests for each of the methods
20+
# look at tests in existing modules for more examples

astroquery/vamdc/tests/test_module_remote.py renamed to astroquery/vamdc/tests/test_vamdc_remote.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,15 @@
88

99
from astropy.tests.helper import remote_data, pytest
1010

11-
from ... import vamdc
11+
try:
12+
from ... import vamdc
13+
import vamdclib
14+
HAS_VAMDCLIB = True
15+
except ImportError:
16+
HAS_VAMDCLIB = False
1217

1318

19+
@pytest.mark.skipif('not HAS_VAMDCLIB')
1420
@remote_data
1521
class TestVamdcClass:
1622
# now write tests for each method here

0 commit comments

Comments
 (0)