Skip to content

Commit

Permalink
Verfiy the tests didnt pass due to fails within
Browse files Browse the repository at this point in the history
threads
  • Loading branch information
elronbandel committed Nov 29, 2023
1 parent 2e23ec5 commit d9ac62a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/test_random_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


0 comments on commit d9ac62a

Please sign in to comment.