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):
27
27
28
28
@pytest .mark .end_to_end
29
29
def test_dry_run_w_subsequent_task (runner , tmp_path ):
30
+ """Subsequent tasks would be executed if their previous task changed."""
30
31
source = """
31
32
import pytask
32
33
@@ -61,6 +62,7 @@ def task_example(produces):
61
62
62
63
@pytest .mark .end_to_end
63
64
def test_dry_run_w_subsequent_skipped_task (runner , tmp_path ):
65
+ """A skip is more important than a would be run."""
64
66
source = """
65
67
import pytask
66
68
@@ -135,7 +137,28 @@ def task_example(produces):
135
137
136
138
137
139
@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 ):
139
162
source = """
140
163
import pytask
141
164
You can’t perform that action at this time.
0 commit comments