From 66f1416b7798417b503fefe8f6155c9491442f20 Mon Sep 17 00:00:00 2001 From: "Tristan F." Date: Thu, 28 Aug 2025 13:37:20 -0700 Subject: [PATCH 1/2] test(btb): singularity --- test/BowTieBuilder/test_btb.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/BowTieBuilder/test_btb.py b/test/BowTieBuilder/test_btb.py index 4f0952f16..aa399618a 100644 --- a/test/BowTieBuilder/test_btb.py +++ b/test/BowTieBuilder/test_btb.py @@ -306,3 +306,14 @@ def test_weight_one(self): # Check if the sets are equal, regardless of the order of lines assert output_content == expected_content, 'Output file does not match expected output file' + + # Only run Singularity test if the binary is available on the system + # spython is only available on Unix, but do not explicitly skip non-Unix platforms + @pytest.mark.skipif(not shutil.which('singularity'), reason='Singularity not found on system') + def test_btb_singularity(self): + OUT_FILE_DEFAULT.unlink(missing_ok=True) + BTB.run(edges=Path(TEST_DIR, 'input', 'source-to-source-edges.txt'), + sources=Path(TEST_DIR, 'input', 'btb-sources.txt'), + targets=Path(TEST_DIR, 'input', 'btb-targets.txt'), + output_file=OUT_FILE_DEFAULT, + container_framework="singularity") From d4bb58c420e0a43890cb491cd2482e43d668d2b4 Mon Sep 17 00:00:00 2001 From: "Tristan F." Date: Thu, 28 Aug 2025 13:40:53 -0700 Subject: [PATCH 2/2] test(btb): add shutil import --- test/BowTieBuilder/test_btb.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/BowTieBuilder/test_btb.py b/test/BowTieBuilder/test_btb.py index aa399618a..8b7997692 100644 --- a/test/BowTieBuilder/test_btb.py +++ b/test/BowTieBuilder/test_btb.py @@ -1,3 +1,4 @@ +import shutil import sys from pathlib import Path @@ -306,7 +307,7 @@ def test_weight_one(self): # Check if the sets are equal, regardless of the order of lines assert output_content == expected_content, 'Output file does not match expected output file' - + # Only run Singularity test if the binary is available on the system # spython is only available on Unix, but do not explicitly skip non-Unix platforms @pytest.mark.skipif(not shutil.which('singularity'), reason='Singularity not found on system')