From 0eb1b51fe25b1fbdb459cf87c5eae7b5bd082e43 Mon Sep 17 00:00:00 2001 From: meesters Date: Mon, 15 Dec 2025 12:33:40 +0100 Subject: [PATCH 1/3] tests: added test case for the latest PR which allows passing the command line via stdin --- tests/test_pass_command_as_script.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 tests/test_pass_command_as_script.py diff --git a/tests/test_pass_command_as_script.py b/tests/test_pass_command_as_script.py new file mode 100644 index 0000000..df4ca10 --- /dev/null +++ b/tests/test_pass_command_as_script.py @@ -0,0 +1,19 @@ +from typing import Optional +from snakemake_executor_plugin_slurm.__init__ import ExecutorSettings + +class TestPassCommandAsScript(snakemake.common.tests.TestWorkflowsLocalStorageBase): + """Integration-style test that runs the real workflow on the Slurm test cluster + and verifies the plugin can submit the job by passing the command as a script + via stdin (pass_command_as_script=True). + """ + __test__ = True + + def get_executor(self) -> str: + return "slurm" + + def get_executor_settings(self) -> Optional[ExecutorSettingsBase]: + # Use the real ExecutorSettings and enable the flag under test. + return ExecutorSettings( + pass_command_as_script=True, + init_seconds_before_status_checks=2, + ) \ No newline at end of file From d3a3171dd62ef6d70a6426c43e7577a7fa459e12 Mon Sep 17 00:00:00 2001 From: meesters Date: Mon, 15 Dec 2025 12:43:53 +0100 Subject: [PATCH 2/3] tests: added test case for the latest PR which allows passing the command line via stdin --- tests/test_pass_command_as_script.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test_pass_command_as_script.py b/tests/test_pass_command_as_script.py index df4ca10..1e77091 100644 --- a/tests/test_pass_command_as_script.py +++ b/tests/test_pass_command_as_script.py @@ -1,5 +1,7 @@ from typing import Optional -from snakemake_executor_plugin_slurm.__init__ import ExecutorSettings +import snakemake.common.tests +from snakemake_interface_executor_plugins.settings import ExecutorSettingsBase +from snakemake_executor_plugin_slurm import ExecutorSettings class TestPassCommandAsScript(snakemake.common.tests.TestWorkflowsLocalStorageBase): """Integration-style test that runs the real workflow on the Slurm test cluster From 03aef11c321e0a4a5528302dbe6f0b9bdec5069a Mon Sep 17 00:00:00 2001 From: meesters Date: Mon, 15 Dec 2025 12:44:23 +0100 Subject: [PATCH 3/3] fix: formatting --- tests/test_pass_command_as_script.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test_pass_command_as_script.py b/tests/test_pass_command_as_script.py index 1e77091..5932dd2 100644 --- a/tests/test_pass_command_as_script.py +++ b/tests/test_pass_command_as_script.py @@ -3,11 +3,13 @@ from snakemake_interface_executor_plugins.settings import ExecutorSettingsBase from snakemake_executor_plugin_slurm import ExecutorSettings + class TestPassCommandAsScript(snakemake.common.tests.TestWorkflowsLocalStorageBase): """Integration-style test that runs the real workflow on the Slurm test cluster and verifies the plugin can submit the job by passing the command as a script via stdin (pass_command_as_script=True). """ + __test__ = True def get_executor(self) -> str: @@ -18,4 +20,4 @@ def get_executor_settings(self) -> Optional[ExecutorSettingsBase]: return ExecutorSettings( pass_command_as_script=True, init_seconds_before_status_checks=2, - ) \ No newline at end of file + )