Skip to content

Commit 5bd3dcf

Browse files
committed
make test_config::test_set_gmxrc_environment skippable
1 parent 88619e3 commit 5bd3dcf

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

tests/test_config.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ def GMXRC():
3333
bindir = os.path.dirname(path)
3434
GMXRC = os.path.join(bindir, "GMXRC")
3535
if not os.path.exists(GMXRC):
36-
raise IOError(errno.ENOENT, "Could not find Gromacs setup file", GMXRC)
36+
# return None if GMXRC is not available so that we can skip the test
37+
# (needed for test in deployment workflow)
38+
return None
3739
return GMXRC
3840

3941

@@ -49,6 +51,8 @@ def temp_environ():
4951

5052
def test_set_gmxrc_environment(GMXRC):
5153
# not threadsafe: function modifies the global process environment
54+
if GMXRC is None:
55+
pytest.skip("GMXRC not available (GROMACS may still be installed)")
5256

5357
gmx_envvars = (
5458
"GMXBIN",

0 commit comments

Comments
 (0)