From 4959c33d2555b89b494c678d99be81a65ee864b0 Mon Sep 17 00:00:00 2001 From: Jake Tesler Date: Sun, 12 May 2019 10:08:24 -0700 Subject: bpo-36084: Add native thread ID to threading.Thread objects (GH-11993) --- Lib/test/test_threading.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Lib/test/test_threading.py') diff --git a/Lib/test/test_threading.py b/Lib/test/test_threading.py index 2ddc77b266..6ac6e9de7a 100644 --- a/Lib/test/test_threading.py +++ b/Lib/test/test_threading.py @@ -104,6 +104,10 @@ class ThreadTests(BaseTestCase): self.assertRegex(repr(t), r'^$') t.start() + native_ids = set(t.native_id for t in threads) | {threading.get_native_id()} + self.assertNotIn(None, native_ids) + self.assertEqual(len(native_ids), NUMTASKS + 1) + if verbose: print('waiting for all tasks to complete') for t in threads: -- cgit v1.2.1