Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ebonnal committed Oct 18, 2024
1 parent fe87944 commit 6a58c7d
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions Lib/test/test_concurrent_futures/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,20 +72,16 @@ def test_map_timeout(self):
self.assertEqual([None, None], results)

def test_map_args(self):
with self.assertRaisesRegex(
ValueError, "buffersize must be None or >= 1."
):
with self.assertRaisesRegex(ValueError, "buffersize must be None or >= 1."):
self.executor.map(bool, [], buffersize=0)
with self.assertRaisesRegex(
ValueError, "cannot specify both buffersize and timeout."
):
self.executor.map(bool, [], timeout=1, buffersize=1)

def test_map_infinite_iterable(self):
self.assertEqual(
next(iter(self.executor.map(str, itertools.count(1), buffersize=1))),
"1",
)
results = self.executor.map(str, itertools.count(1), buffersize=1)
self.assertEqual(next(iter(results)), "1")

def test_map_buffersize(self):
manager = Manager()
Expand Down Expand Up @@ -113,8 +109,6 @@ def test_map_buffersize(self):
set(range(min(buffersize + 1, iterable_size))),
)



def test_shutdown_race_issue12456(self):
# Issue #12456: race condition at shutdown where trying to post a
# sentinel in the call queue blocks (the queue is full while processes
Expand Down

0 comments on commit 6a58c7d

Please sign in to comment.