Skip to content

Commit c937eaf

Browse files
committed
Fix.
1 parent 4df6552 commit c937eaf

4 files changed

Lines changed: 13 additions & 6 deletions

File tree

tests/test_capture.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def task_show_capture():
8787
"""
8888
tmp_path.joinpath("workflow.py").write_text(textwrap.dedent(source))
8989

90-
result = run_in_subprocess(("python", "workflow.py"), cwd=tmp_path)
90+
result = run_in_subprocess(("uv", "run", "python", "workflow.py"), cwd=tmp_path)
9191

9292
assert result.exit_code == ExitCode.FAILED
9393

@@ -128,7 +128,7 @@ def test_wrong_capture_method(tmp_path):
128128
"""
129129
tmp_path.joinpath("workflow.py").write_text(textwrap.dedent(source))
130130

131-
result = run_in_subprocess(("python", "workflow.py"), cwd=tmp_path)
131+
result = run_in_subprocess(("uv", "run", "python", "workflow.py"), cwd=tmp_path)
132132
assert result.exit_code == ExitCode.CONFIGURATION_FAILED
133133
assert "Value 'a' is not a valid" in result.stdout
134134
assert "Traceback" not in result.stdout
@@ -255,7 +255,7 @@ def task_unicode():
255255
tmp_path.joinpath("workflow.py").write_text(
256256
textwrap.dedent(source), encoding="utf-8"
257257
)
258-
result = run_in_subprocess(("python", "workflow.py"), cwd=tmp_path)
258+
result = run_in_subprocess(("uv", "run", "python", "workflow.py"), cwd=tmp_path)
259259
assert result.exit_code == ExitCode.OK
260260
assert "1 Succeeded" in result.stdout
261261

tests/test_dag_command.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,10 @@ def main():
9292
tmp_path.joinpath("input.txt").touch()
9393

9494
result = subprocess.run(
95-
("python", "task_example.py"), cwd=tmp_path, check=True, capture_output=True
95+
("uv", "run", "python", "task_example.py"),
96+
cwd=tmp_path,
97+
check=True,
98+
capture_output=True,
9699
)
97100

98101
assert result.returncode == ExitCode.OK

tests/test_execute.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,8 @@ def create_file(
602602
"""
603603
tmp_path.joinpath("task_module.py").write_text(textwrap.dedent(source))
604604
result = subprocess.run(
605-
("python", tmp_path.joinpath("task_module.py").as_posix()), check=False
605+
("uv", "run", "python", tmp_path.joinpath("task_module.py").as_posix()),
606+
check=False,
606607
)
607608
assert result.returncode == ExitCode.OK
608609
assert tmp_path.joinpath("file.txt").read_text() == "This is the text."

tests/test_task.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,10 @@ def task_second():
667667
tmp_path.joinpath("task_example.py").write_text(textwrap.dedent(source))
668668

669669
result = subprocess.run(
670-
("python", "task_example.py"), cwd=tmp_path, capture_output=True, check=False
670+
("uv", "run", "python", "task_example.py"),
671+
cwd=tmp_path,
672+
capture_output=True,
673+
check=False,
671674
)
672675
assert "2 Succeeded" in result.stdout.decode()
673676
assert result.returncode == ExitCode.OK

0 commit comments

Comments
 (0)