Skip to content

Commit 6a58c7d

Browse files
committed
lint
1 parent fe87944 commit 6a58c7d

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

Lib/test/test_concurrent_futures/executor.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -72,20 +72,16 @@ def test_map_timeout(self):
7272
self.assertEqual([None, None], results)
7373

7474
def test_map_args(self):
75-
with self.assertRaisesRegex(
76-
ValueError, "buffersize must be None or >= 1."
77-
):
75+
with self.assertRaisesRegex(ValueError, "buffersize must be None or >= 1."):
7876
self.executor.map(bool, [], buffersize=0)
7977
with self.assertRaisesRegex(
8078
ValueError, "cannot specify both buffersize and timeout."
8179
):
8280
self.executor.map(bool, [], timeout=1, buffersize=1)
8381

8482
def test_map_infinite_iterable(self):
85-
self.assertEqual(
86-
next(iter(self.executor.map(str, itertools.count(1), buffersize=1))),
87-
"1",
88-
)
83+
results = self.executor.map(str, itertools.count(1), buffersize=1)
84+
self.assertEqual(next(iter(results)), "1")
8985

9086
def test_map_buffersize(self):
9187
manager = Manager()
@@ -113,8 +109,6 @@ def test_map_buffersize(self):
113109
set(range(min(buffersize + 1, iterable_size))),
114110
)
115111

116-
117-
118112
def test_shutdown_race_issue12456(self):
119113
# Issue #12456: race condition at shutdown where trying to post a
120114
# sentinel in the call queue blocks (the queue is full while processes

0 commit comments

Comments
 (0)