Skip to content

Commit a905182

Browse files
cmeesterscademirch
andauthored
test: passing script (#394)
This PR creates a new test case for PR #379 - ought to work only, once the jobstep-plugin release is through bioconda. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Tests** * Added an integration-style test verifying submission of commands as scripts via stdin to the Slurm executor (ensures pass-as-script behavior and shortened pre-check timing). <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Cade Mirchandani <cmirchan@ucsc.edu>
1 parent 2f302f2 commit a905182

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

tests/tests.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,25 @@ def get_executor_settings(self) -> Optional[ExecutorSettingsBase]:
2727
)
2828

2929

30+
class TestPassCommandAsScript(snakemake.common.tests.TestWorkflowsLocalStorageBase):
31+
"""Integration-style test that runs the real workflow on the Slurm test cluster
32+
and verifies the plugin can submit the job by passing the command as a script
33+
via stdin (pass_command_as_script=True).
34+
"""
35+
36+
__test__ = True
37+
38+
def get_executor(self) -> str:
39+
return "slurm"
40+
41+
def get_executor_settings(self) -> Optional[ExecutorSettingsBase]:
42+
# Use the real ExecutorSettings and enable the flag under test.
43+
return ExecutorSettings(
44+
pass_command_as_script=True,
45+
init_seconds_before_status_checks=2,
46+
)
47+
48+
3049
class TestEfficiencyReport(snakemake.common.tests.TestWorkflowsLocalStorageBase):
3150
__test__ = True
3251

0 commit comments

Comments
 (0)