Skip to content

Commit 44483a0

Browse files
committed
Clean up code
1 parent 827bbbb commit 44483a0

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Lib/test/test_concurrent_futures/test_wait.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,15 +126,14 @@ def test_timeout(self):
126126
timeout=short_timeout,
127127
return_when=futures.ALL_COMPLETED)
128128

129-
self.event.set()
130-
futures.wait([future], return_when=futures.ALL_COMPLETED)
131-
132129
self.assertEqual(set([CANCELLED_AND_NOTIFIED_FUTURE,
133130
EXCEPTION_FUTURE,
134131
SUCCESSFUL_FUTURE]),
135132
finished)
136133
self.assertEqual(set([future]), pending)
137134

135+
# Set the event to allow the future to complete
136+
self.event.set()
138137

139138
class ThreadPoolWaitTests(ThreadPoolMixin, WaitTests, BaseTestCase):
140139

0 commit comments

Comments
 (0)