Skip to content

Commit

Permalink
Merge pull request #13 from sot/ciao_test
Browse files Browse the repository at this point in the history
Add skip for missing CIAO
  • Loading branch information
jeanconn authored Nov 20, 2019
2 parents ddd9135 + 3dc3757 commit f01ae8b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Ska/Shell/tests/test_shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'


Expand Down Expand Up @@ -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)]
Expand Down

0 comments on commit f01ae8b

Please sign in to comment.