Skip to content

Commit e78a5eb

Browse files
committed
Revert "test_environment: simplify SINGULARITY_BIND handling"
This reverts commit 5b9f472.
1 parent 61a455d commit e78a5eb

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

tests/test_environment.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,11 +159,14 @@ def PWD(v: str, env: Env) -> bool:
159159
if version >= Version("3.6"):
160160
sing_vars["SINGULARITY_COMMAND"] = "exec"
161161
if version >= Version("3.7"):
162+
if version > Version("3.9"):
163+
sing_vars["SINGULARITY_BIND"] = ""
164+
else:
162165

163-
def BIND(v: str, env: Env) -> bool:
164-
return True
166+
def BIND(v: str, env: Env) -> bool:
167+
return v.startswith(tmp_prefix) and v.endswith(":/tmp")
165168

166-
sing_vars["SINGULARITY_BIND"] = BIND
169+
sing_vars["SINGULARITY_BIND"] = BIND
167170
if version >= Version("3.10"):
168171
sing_vars["SINGULARITY_COMMAND"] = "run"
169172
sing_vars["SINGULARITY_NO_EVAL"] = None

0 commit comments

Comments
 (0)