Skip to content

Commit 1a5b7b0

Browse files
authored
Merge branch 'main' into pre-commit-ci-update-config
2 parents 29206f7 + 9eb2245 commit 1a5b7b0

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ Provide a description and/or bullet points to describe the changes in this PR.
66

77
- [ ] Reference issues which can be closed due to this PR with "Closes #x".
88
- [ ] Review whether the documentation needs to be updated.
9-
- [ ] Document PR in docs/changes.rst.
9+
- [ ] Document PR in docs/source/changes.md.

docs/source/changes.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ releases are available on [PyPI](https://pypi.org/project/pytask) and
1010
- {pull}`617` fixes an interaction with provisional nodes and `@mark.persist`.
1111
- {pull}`618` ensures that `root_dir` of `DirectoryNode` is created before the task is
1212
executed.
13+
- {pull}`619` makes coiled an optional import for tests. Thanks to {user}`erooke`.
14+
- {pull}`620` makes tests more flexible about their location. Thanks to {user}`erooke`.
15+
- {pull}`621` fixes the pull requests template.
1316

1417
## 0.5.0 - 2024-05-26
1518

tests/test_console.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ def test_format_task_id(
153153
PathNode.from_path(_ROOT.joinpath("src/module.py")),
154154
[_ROOT.joinpath("alternative_src")],
155155
does_not_raise(),
156-
Text("pytask/src/module.py"),
156+
Text(f"{_ROOT.name}/src/module.py"),
157157
id="Common path found for PathNode not in 'paths' and 'paths'",
158158
),
159159
pytest.param(
@@ -174,7 +174,7 @@ def test_format_task_id(
174174
PythonNode(name=_ROOT.as_posix() + "/task_a.py::task_a::a", value=None),
175175
[_ROOT],
176176
does_not_raise(),
177-
Text("pytask/task_a.py::task_a::a"),
177+
Text(f"{_ROOT.name}/task_a.py::task_a::a"),
178178
id="PythonNode with automatically assigned name",
179179
),
180180
],

tests/test_shared.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import textwrap
55
from contextlib import ExitStack as does_not_raise # noqa: N813
66

7-
import coiled
87
import pytest
98
from _pytask.shared import convert_to_enum
109
from _pytask.shared import find_duplicates
@@ -76,5 +75,13 @@ def wrapper():
7675
decorated = decorator(task)
7776
assert unwrap_task_function(decorated) is task
7877

78+
79+
@pytest.mark.unit()
80+
def test_no_unwrap_coiled():
81+
coiled = pytest.importorskip("coiled")
82+
83+
def task():
84+
pass
85+
7986
coiled_decorated = coiled.function()(task)
8087
assert unwrap_task_function(coiled_decorated) is coiled_decorated

0 commit comments

Comments
 (0)