Commit 85772e55f2afa55bb248ad656b35191e61ed0bb6
1 parent
673a1331
Unset VHEFITS environment variable during cscripts unit testing
Showing
1 changed file
with
8 additions
and
0 deletions
test/test_python_cscripts.py
| ... | ... | @@ -166,6 +166,14 @@ def test(installed=False, debug=False): |
| 166 | 166 | ver = sys.version.split()[0] |
| 167 | 167 | if ver >= '2.6.0': |
| 168 | 168 | |
| 169 | + # Check for VHEFITS environment variable | |
| 170 | + if 'VHEFITS' in os.environ: | |
| 171 | + | |
| 172 | + # If environment variable exists then unset for the test cases. | |
| 173 | + # Since Python is executed in a subprocess this will not impact | |
| 174 | + # the environment variable in the parent shell. | |
| 175 | + del os.environ['VHEFITS'] | |
| 176 | + | |
| 169 | 177 | # Allocate test suites |
| 170 | 178 | suite_csfindobs = test_csfindobs.Test() |
| 171 | 179 | suite_csiactcopy = test_csiactcopy.Test() | ... | ... |