diff --git a/Ska/Shell/tests/test_shell.py b/Ska/Shell/tests/test_shell.py index 4f5d1cf..758b31e 100644 --- a/Ska/Shell/tests/test_shell.py +++ b/Ska/Shell/tests/test_shell.py @@ -5,6 +5,8 @@ from Ska.Shell import (Spawn, RunTimeoutError, bash, tcsh, getenv, importenv, tcsh_shell, bash_shell) +HAS_HEAD_CIAO = os.path.exists('/soft/ciao/bin/ciao.sh') + outfile = 'ska_shell_test.dat' @@ -93,6 +95,7 @@ def test_logfile(self): assert outlines[2] == 'line2' assert outlines[3].startswith('Bash') + @pytest.mark.skipif('not HAS_HEAD_CIAO', reason='Test requires /soft/ciao/bin/ciao.sh') def test_ciao(self): envs = getenv('. /soft/ciao/bin/ciao.sh') test_script = ['printenv {}'.format(name) for name in sorted(envs)]