File tree Expand file tree Collapse file tree 1 file changed +24
-1
lines changed Expand file tree Collapse file tree 1 file changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ def task_example(produces):
2727
2828@pytest .mark .end_to_end
2929def test_dry_run_w_subsequent_task (runner , tmp_path ):
30+ """Subsequent tasks would be executed if their previous task changed."""
3031 source = """
3132 import pytask
3233
@@ -61,6 +62,7 @@ def task_example(produces):
6162
6263@pytest .mark .end_to_end
6364def test_dry_run_w_subsequent_skipped_task (runner , tmp_path ):
65+ """A skip is more important than a would be run."""
6466 source = """
6567 import pytask
6668
@@ -135,7 +137,28 @@ def task_example(produces):
135137
136138
137139@pytest .mark .end_to_end
138- def test_dry_run_skipped_successul (runner , tmp_path ):
140+ def test_dry_run_skip_all (runner , tmp_path ):
141+ source = """
142+ import pytask
143+
144+ @pytask.mark.skip
145+ @pytask.mark.produces("out.txt")
146+ def task_example_skip(): ...
147+
148+ @pytask.mark.skip
149+ @pytask.mark.depends_on("out.txt")
150+ def task_example_skip_subsequent(): ...
151+ """
152+ tmp_path .joinpath ("task_example.py" ).write_text (textwrap .dedent (source ))
153+
154+ result = runner .invoke (cli , ["--dry-run" , tmp_path .as_posix ()])
155+
156+ assert result .exit_code == ExitCode .OK
157+ assert "2 Skipped" in result .output
158+
159+
160+ @pytest .mark .end_to_end
161+ def test_dry_run_skipped_successful (runner , tmp_path ):
139162 source = """
140163 import pytask
141164
You can’t perform that action at this time.
0 commit comments