File tree Expand file tree Collapse file tree 2 files changed +30
-80
lines changed Expand file tree Collapse file tree 2 files changed +30
-80
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
# Licensed under a 3-clause BSD style license - see LICENSE.rst
2
2
3
- import numpy as np
4
- from astropy . utils import minversion
3
+ import os
4
+ from pathlib import Path
5
5
6
+ from astropy .utils import minversion
7
+ import numpy as np
8
+ import pytest
6
9
from pytest_astropy_header .display import (PYTEST_HEADER_MODULES ,
7
10
TESTED_VERSIONS )
8
11
@@ -22,6 +25,10 @@ def pytest_configure(config):
22
25
PYTEST_HEADER_MODULES ['astropy-healpix' ] = 'astropy_healpix'
23
26
PYTEST_HEADER_MODULES ['vamdclib' ] = 'vamdclib'
24
27
28
+ del PYTEST_HEADER_MODULES ['h5py' ]
29
+ del PYTEST_HEADER_MODULES ['Scipy' ]
30
+ del PYTEST_HEADER_MODULES ['Pandas' ]
31
+
25
32
# keyring doesn't provide __version__ any more
26
33
# PYTEST_HEADER_MODULES['keyring'] = 'keyring'
27
34
@@ -32,3 +39,24 @@ def pytest_configure(config):
32
39
33
40
TESTED_VERSIONS ['astroquery' ] = version .version
34
41
TESTED_VERSIONS ['astropy_helpers' ] = version .astropy_helpers_version
42
+
43
+
44
+ def pytest_addoption (parser ):
45
+ parser .addoption (
46
+ '--alma-site' ,
47
+ action = 'store' ,
48
+ default = 'almascience.eso.org' ,
49
+ help = 'ALMA site (almascience.nrao.edu, almascience.eso.org or '
50
+ 'almascience.nao.ac.jp for example)'
51
+ )
52
+
53
+
54
+ @pytest .fixture (scope = 'function' )
55
+ def tmp_cwd (tmp_path ):
56
+ """Perform test in a pristine temporary working directory."""
57
+ old_dir = Path .cwd ()
58
+ os .chdir (tmp_path )
59
+ try :
60
+ yield tmp_path
61
+ finally :
62
+ os .chdir (old_dir )
You can’t perform that action at this time.
0 commit comments