File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -630,6 +630,7 @@ def test_api_misuse(self):
630630 regex = regex .format (ptr = self .PTR_REGEX )
631631 self .assertRegex (out , regex )
632632
633+ @unittest .skipUnless (threading , 'Test requires a GIL (multithreading)' )
633634 def check_malloc_without_gil (self , code ):
634635 out = self .check (code )
635636 expected = ('Fatal Python error: Python memory allocator called '
Original file line number Diff line number Diff line change @@ -696,7 +696,12 @@ def test_slow_interrupted(self):
696696 code = TEST_INTERRUPTED
697697 test = self .create_test ("sigint" , code = code )
698698
699- for multiprocessing in (False , True ):
699+ try :
700+ import threading
701+ tests = (False , True )
702+ except ImportError :
703+ tests = (False ,)
704+ for multiprocessing in tests :
700705 if multiprocessing :
701706 args = ("--slowest" , "-j2" , test )
702707 else :
You can’t perform that action at this time.
0 commit comments