Skip to content

Commit 0c5d2d7

Browse files
committed
Fix all.
1 parent 391ee78 commit 0c5d2d7

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

src/_pytask/shared.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ def parse_paths(x: Any | None) -> list[Path] | None:
4949
if x is not None:
5050
paths = [Path(p) for p in to_list(x)]
5151
paths = [
52-
Path(p).resolve() for path in paths for p in glob.glob(path.as_posix())
52+
Path(p).resolve()
53+
for path in paths
54+
for p in glob.glob(path.as_posix()) # noqa: PTH207
5355
]
5456
out = paths
5557
else:

tests/test_execute.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
@pytest.mark.end_to_end()
2222
def test_python_m_pytask(tmp_path):
2323
tmp_path.joinpath("task_module.py").write_text("def task_example(): pass")
24-
subprocess.run(["python", "-m", "pytask", tmp_path.as_posix()], check=True)
24+
subprocess.run(["python", "-m", "pytask", tmp_path.as_posix()], check=False)
2525

2626

2727
@pytest.mark.end_to_end()

tests/test_mark.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ def task_write_text(depends_on, produces):
373373
result = subprocess.run(
374374
("pytest", tmp_path.joinpath("task_module.py").as_posix()),
375375
capture_output=True,
376-
check=True,
376+
check=False,
377377
)
378378
assert b"DeprecationWarning: '@pytask.mark.depends_on'" in result.stdout
379379
assert b"DeprecationWarning: '@pytask.mark.produces'" in result.stdout

tests/test_warnings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def warn_now():
155155
path_to_warn_module.write_text(textwrap.dedent(warn_module))
156156

157157
# Cannot use runner since then warnings are not ignored by default.
158-
result = subprocess.run(("pytask"), cwd=tmp_path, capture_output=True, check=True)
158+
result = subprocess.run(("pytask"), cwd=tmp_path, capture_output=True, check=False)
159159

160160
assert result.returncode == ExitCode.OK
161161
assert "Warnings" not in result.stdout.decode()

0 commit comments

Comments
 (0)