Skip to content

Commit 71db0f4

Browse files
committed
Reduce path names.
1 parent dc4abe2 commit 71db0f4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/_pytask/execute.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
from _pytask.report import ExecutionReport
2929
from _pytask.session import Session
3030
from _pytask.shared import get_first_non_none_value
31+
from _pytask.shared import reduce_node_name
3132
from _pytask.traceback import format_exception_without_traceback
3233
from _pytask.traceback import remove_traceback_from_exc_info
3334
from _pytask.traceback import render_exc_info
@@ -180,7 +181,7 @@ def pytask_execute_task_teardown(session: Session, task: Task) -> None:
180181
missing_nodes.append(node)
181182

182183
if missing_nodes:
183-
paths = [str(i.path) for i in missing_nodes]
184+
paths = [reduce_node_name(i, session.config["paths"]) for i in missing_nodes]
184185
formatted = format_strings_as_flat_tree(
185186
paths, "The task did not produce the following files:\n", ""
186187
)

tests/test_execute.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ def task_example():
4646
pass
4747
"""
4848
tmp_path.joinpath("task_module.py").write_text(textwrap.dedent(source))
49-
tmp_path.joinpath("pyproject.toml").touch()
5049

5150
result = runner.invoke(cli, [tmp_path.as_posix()])
5251

0 commit comments

Comments
 (0)