summaryrefslogtreecommitdiff
path: root/Lib/test/test_capi.py
diff options
context:
space:
mode:
authorAntoine Pitrou <pitrou@free.fr>2017-09-07 18:56:24 +0200
committerVictor Stinner <victor.stinner@gmail.com>2017-09-07 18:56:24 +0200
commita6a4dc816d68df04a7d592e0b6af8c7ecc4d4344 (patch)
tree1c31738009bee903417cea928e705a112aea2392 /Lib/test/test_capi.py
parent1f06a680de465be0c24a78ea3b610053955daa99 (diff)
downloadcpython-git-a6a4dc816d68df04a7d592e0b6af8c7ecc4d4344.tar.gz
bpo-31370: Remove support for threads-less builds (#3385)
* Remove Setup.config * Always define WITH_THREAD for compatibility.
Diffstat (limited to 'Lib/test/test_capi.py')
-rw-r--r--Lib/test/test_capi.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/Lib/test/test_capi.py b/Lib/test/test_capi.py
index c3a04b49df..1b826ee8d9 100644
--- a/Lib/test/test_capi.py
+++ b/Lib/test/test_capi.py
@@ -11,6 +11,7 @@ import subprocess
import sys
import sysconfig
import textwrap
+import threading
import time
import unittest
from test import support
@@ -20,10 +21,7 @@ try:
import _posixsubprocess
except ImportError:
_posixsubprocess = None
-try:
- import threading
-except ImportError:
- threading = None
+
# Skip this test if the _testcapi module isn't available.
_testcapi = support.import_module('_testcapi')
@@ -52,7 +50,6 @@ class CAPITest(unittest.TestCase):
self.assertEqual(testfunction.attribute, "test")
self.assertRaises(AttributeError, setattr, inst.testfunction, "attribute", "test")
- @unittest.skipUnless(threading, 'Threading required for this test.')
def test_no_FatalError_infinite_loop(self):
with support.SuppressCrashReport():
p = subprocess.Popen([sys.executable, "-c",
@@ -276,7 +273,6 @@ class CAPITest(unittest.TestCase):
self.assertIn(b'MemoryError 3 30', out)
-@unittest.skipUnless(threading, 'Threading required for this test.')
class TestPendingCalls(unittest.TestCase):
def pendingcalls_submit(self, l, n):
@@ -685,7 +681,6 @@ class SkipitemTest(unittest.TestCase):
parse((1,), {}, 'O|OO', ['', 'a', ''])
-@unittest.skipUnless(threading, 'Threading required for this test.')
class TestThreadState(unittest.TestCase):
@support.reap_threads
@@ -762,7 +757,6 @@ class PyMemDebugTests(unittest.TestCase):
regex = regex.format(ptr=self.PTR_REGEX)
self.assertRegex(out, regex)
- @unittest.skipUnless(threading, 'Test requires a GIL (multithreading)')
def check_malloc_without_gil(self, code):
out = self.check(code)
expected = ('Fatal Python error: Python memory allocator called '