Skip to content

Commit

Permalink
Fix tests for when Apptainer/Singularity is available
Browse files Browse the repository at this point in the history
Fixes #7
  • Loading branch information
espenhgn committed Oct 1, 2024
1 parent efa1ecf commit a882657
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_mtag_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
# Check that (1) singularity exist, and (2) if not, check for docker.
# If neither are found, tests will fall back to plain python.
try:
pth = os.path.join('containers', 'mtag.sif')
pth = os.path.join('apptainer', 'mtag.sif')
out = subprocess.run('singularity')
cwd = os.getcwd()
MTAG = f'singularity run {pth}'
PREFIX = f'singularity run {pth} python'
PREFIX_MOUNT = f'singularity run --home={cwd}:/home/ {pth} python'
PREFIX = f'singularity exec {pth} python'
PREFIX_MOUNT = f'singularity exec --home={cwd}:/home/ {pth} python'
except FileNotFoundError:
try:
out = subprocess.run('docker')
Expand Down

0 comments on commit a882657

Please sign in to comment.