Skip to content

Commit c97e319

Browse files
committed
Added test case for '--consider-ancient' parameter
1 parent 4829c08 commit c97e319

File tree

6 files changed

+34
-0
lines changed

6 files changed

+34
-0
lines changed

tests/test_ancient_cli/Snakefile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
shell.executable("bash")
2+
3+
shell("echo '2' > 2 && echo '4' > 4 && sleep 1 && echo '1' > 1 && echo '3' > 3")
4+
5+
rule all:
6+
input:
7+
"2",
8+
"4"
9+
10+
rule A:
11+
input:
12+
"1"
13+
output:
14+
"2",
15+
shell:
16+
"cat {input} > {output}"
17+
18+
rule B:
19+
input:
20+
x="3"
21+
output:
22+
"4",
23+
shell:
24+
"cat {input} > {output}"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
4

tests/tests.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,12 @@ def test_set_resources_complex_cli():
238238
def test_ancient():
239239
run(dpath("test_ancient"), targets=["D", "C", "old_file"])
240240

241+
def test_ancient_cli():
242+
run(
243+
dpath("test_ancient_cli"),
244+
shellcmd="snakemake --consider-ancient A=0 B=x",
245+
)
246+
241247

242248
def test_report():
243249
run(

0 commit comments

Comments
 (0)