From d9ac62a31d133e8c2af67baeac0ab826a6f1cf6b Mon Sep 17 00:00:00 2001 From: Elron Bandel Date: Wed, 29 Nov 2023 10:08:04 -0500 Subject: [PATCH] Verfiy the tests didnt pass due to fails within threads --- tests/test_random_utils.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/test_random_utils.py b/tests/test_random_utils.py index 62d5bb064..9ca64a86b 100644 --- a/tests/test_random_utils.py +++ b/tests/test_random_utils.py @@ -132,9 +132,15 @@ def thread_function(name, sleep_time, results): for index, thread in enumerate(threads): thread.join() + with self.subTest(f'Within Thread {index}'): + self.assertIsNotNone(results[index][0]) + self.assertIsNotNone(results[index][1]) self.assertEqual(results[index][0], results[index][1]) + with self.subTest(f'Across all threads'): flatten_results = [item for sublist in results for item in sublist] self.assertEqual(len(set(flatten_results)), 1) + + \ No newline at end of file