Skip to content

Commit 011f977

Browse files
committed
Update tests for pytask v0.5.
1 parent 612aca3 commit 011f977

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

tests/test_normal_execution_w_plugin.py

+7-6
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,28 @@
1212
@pytest.mark.end_to_end()
1313
@pytest.mark.parametrize(
1414
"dependencies",
15-
[[], ["in.txt"], ["in_1.txt", "in_2.txt"]],
15+
[(), ("in.txt",), ("in_1.txt", "in_2.txt")],
1616
)
17-
@pytest.mark.parametrize("products", [["out.txt"], ["out_1.txt", "out_2.txt"]])
17+
@pytest.mark.parametrize("products", [("out.txt",), ("out_1.txt", "out_2.txt")])
1818
def test_execution_w_varying_dependencies_products(
1919
runner, tmp_path, dependencies, products
2020
):
2121
source = f"""
2222
import pytask
2323
from pathlib import Path
2424
25-
@pytask.mark.depends_on({dependencies})
26-
@pytask.mark.produces({products})
27-
def task_example(depends_on, produces):
25+
def task_example(
26+
depends_on=[Path(p) for p in {dependencies}],
27+
produces=[Path(p) for p in {products}],
28+
):
2829
if isinstance(produces, dict):
2930
produces = produces.values()
3031
elif isinstance(produces, Path):
3132
produces = [produces]
3233
for product in produces:
3334
product.touch()
3435
"""
35-
tmp_path.joinpath("task_example.py").write_text(textwrap.dedent(source))
36+
tmp_path.joinpath("task_dummy.py").write_text(textwrap.dedent(source))
3637
for dependency in dependencies:
3738
tmp_path.joinpath(dependency).touch()
3839

0 commit comments

Comments
 (0)