Skip to content

Commit 965ee43

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
1 parent 957737e commit 965ee43

1 file changed

Lines changed: 25 additions & 18 deletions

File tree

tests/test_methods/test_gather.py

Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1+
import anyio
12
import pytest
23

3-
import anyio
4-
from returns.future import Future, FutureResult
5-
from returns.result import Result
6-
from returns.io import IO, IOResult
4+
from returns.future import FutureResult
5+
from returns.io import IOResult
76
from returns.methods import gather
7+
from returns.result import Result
88

99

1010
async def _helper_func1() -> str:
@@ -14,23 +14,30 @@ async def _helper_func1() -> str:
1414
async def _helper_func2() -> str:
1515
return 'failed function'
1616

17-
@pytest.mark.parametrize(('containers', 'expected'), [
18-
(
17+
18+
@pytest.mark.parametrize(
19+
('containers', 'expected'),
20+
[
1921
(
20-
FutureResult.from_value(1),
21-
FutureResult.from_failure(None),
22+
(
23+
FutureResult.from_value(1),
24+
FutureResult.from_failure(None),
25+
),
26+
(IOResult.from_value(1), IOResult.from_failure(None)),
2227
),
23-
(IOResult.from_value(1), IOResult.from_failure(None)),
24-
),
25-
((), ()),
26-
(
28+
((), ()),
2729
(
28-
_helper_func1(),
29-
_helper_func2(),
30+
(
31+
_helper_func1(),
32+
_helper_func2(),
33+
),
34+
(
35+
IOResult.from_result(Result.from_value('successful function')),
36+
IOResult.from_result(Result.from_failure('failed function')),
37+
),
3038
),
31-
(IOResult.from_result(Result.from_value("successful function")), IOResult.from_result(Result.from_failure("failed function")))
32-
)
33-
])
39+
],
40+
)
3441
def test_gather(containers, expected):
3542
"""Test partition function."""
36-
assert anyio.run(gather,containers) == expected
43+
assert anyio.run(gather, containers) == expected

0 commit comments

Comments
 (0)