@@ -555,52 +555,6 @@ def test_extract_stack_with_cache(frame, depth):
555
555
assert frame1 is frame2 , i
556
556
557
557
558
- @requires_python_version (3 , 3 )
559
- @requires_gevent
560
- def test_get_current_thread_id_gevent_in_thread ():
561
- results = Queue (maxsize = 1 )
562
-
563
- def target ():
564
- job = gevent .spawn (get_current_thread_id )
565
- job .join ()
566
- results .put (job .value )
567
-
568
- thread = threading .Thread (target = target )
569
- thread .start ()
570
- thread .join ()
571
- assert thread .ident == results .get (timeout = 1 )
572
-
573
-
574
- @requires_python_version (3 , 3 )
575
- def test_get_current_thread_id_running_thread ():
576
- results = Queue (maxsize = 1 )
577
-
578
- def target ():
579
- results .put (get_current_thread_id ())
580
-
581
- thread = threading .Thread (target = target )
582
- thread .start ()
583
- thread .join ()
584
- assert thread .ident == results .get (timeout = 1 )
585
-
586
-
587
- @requires_python_version (3 , 3 )
588
- def test_get_current_thread_id_main_thread ():
589
- results = Queue (maxsize = 1 )
590
-
591
- def target ():
592
- # mock that somehow the current thread doesn't exist
593
- with mock .patch ("threading.current_thread" , side_effect = [None ]):
594
- results .put (get_current_thread_id ())
595
-
596
- thread_id = threading .main_thread ().ident if sys .version_info >= (3 , 4 ) else None
597
-
598
- thread = threading .Thread (target = target )
599
- thread .start ()
600
- thread .join ()
601
- assert thread_id == results .get (timeout = 1 )
602
-
603
-
604
558
def get_scheduler_threads (scheduler ):
605
559
return [thread for thread in threading .enumerate () if thread .name == scheduler .name ]
606
560
0 commit comments