Skip to content

Commit 9827662

Browse files
committed
Skip instead of failing if assumptions are invalid
1 parent 32cfb29 commit 9827662

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Lib/test/test_concurrent_futures/executor.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,8 @@ def test_swallows_falsey_exceptions(self):
260260

261261
@warnings_helper.ignore_fork_in_thread_deprecation_warnings()
262262
def test_shutdown_notifies_cancelled_futures(self):
263-
self.assertGreater(self.worker_count, 1)
263+
if self.worker_count < 2:
264+
self.skipTest("test requires more than one worker")
264265

265266
# TODO: remove when gh-109934 is fixed
266267
if self.executor_type is futures.ThreadPoolExecutor:

0 commit comments

Comments
 (0)