File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change 1
1
from __future__ import annotations
2
2
3
- import pickle
4
3
import textwrap
5
- from pathlib import Path
6
4
from time import time
7
5
8
6
import pytest
9
7
from pytask import build
10
8
from pytask import cli
11
9
from pytask import ExitCode
12
- from pytask import Task
13
10
from pytask_parallel .backends import PARALLEL_BACKENDS
14
11
from pytask_parallel .backends import ParallelBackendChoices
15
12
from pytask_parallel .execute import _Sleeper
16
- from pytask_parallel .execute import DefaultBackendNameSpace
17
- from pytask_parallel .execute import ProcessesNameSpace
18
13
19
14
from tests .conftest import restore_sys_path_and_module_after_test_execution
20
15
@@ -280,15 +275,16 @@ def task_example() -> Annotated[str, Path("file.txt")]:
280
275
assert tmp_path .joinpath ("file.txt" ).exists ()
281
276
282
277
283
-
284
278
@pytest .mark .end_to_end ()
285
279
@pytest .mark .parametrize ("parallel_backend" , _PARALLEL_BACKENDS_PARAMETRIZATION )
286
280
def test_task_without_path_that_return (runner , tmp_path , parallel_backend ):
287
281
source = """
288
282
from pathlib import Path
289
283
from pytask import task
290
284
291
- task_example = task(produces=Path("file.txt"))(lambda *x: "Hello, Darkness, my old friend.")
285
+ task_example = task(
286
+ produces=Path("file.txt")
287
+ )(lambda *x: "Hello, Darkness, my old friend.")
292
288
"""
293
289
tmp_path .joinpath ("task_example.py" ).write_text (textwrap .dedent (source ))
294
290
result = runner .invoke (
You can’t perform that action at this time.
0 commit comments