Skip to content

Commit ddf54b5

Browse files
committed
wait for cancelled
1 parent f544705 commit ddf54b5

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

tests/test_cache_fileexecutor_serial.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from concurrent.futures import Future
1+
from concurrent.futures import Future, CancelledError
22
import os
33
from queue import Queue
44
import shutil
@@ -161,6 +161,9 @@ def test_executor_function_cancel_false(self):
161161
},
162162
)
163163
process.start()
164+
self.assertFalse(fs1.done())
165+
with self.assertRaises(CancelledError):
166+
fs1.result()
164167
self.assertTrue(fs1.cancelled())
165168
sleep(2)
166169
process = Thread(

0 commit comments

Comments
 (0)