@@ -72,20 +72,16 @@ def test_map_timeout(self):
72
72
self .assertEqual ([None , None ], results )
73
73
74
74
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." ):
78
76
self .executor .map (bool , [], buffersize = 0 )
79
77
with self .assertRaisesRegex (
80
78
ValueError , "cannot specify both buffersize and timeout."
81
79
):
82
80
self .executor .map (bool , [], timeout = 1 , buffersize = 1 )
83
81
84
82
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" )
89
85
90
86
def test_map_buffersize (self ):
91
87
manager = Manager ()
@@ -113,8 +109,6 @@ def test_map_buffersize(self):
113
109
set (range (min (buffersize + 1 , iterable_size ))),
114
110
)
115
111
116
-
117
-
118
112
def test_shutdown_race_issue12456 (self ):
119
113
# Issue #12456: race condition at shutdown where trying to post a
120
114
# sentinel in the call queue blocks (the queue is full while processes
0 commit comments