summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_threading.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2014-02-07 08:10:55 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2014-02-07 08:10:55 (GMT)
commitf28ba369dd068a76ff5b7efac58fdcb5c3eaf4dd (patch)
tree541cb209a2be79d6022ce5d47216755e9e9310a4 /Lib/test/test_threading.py
parent622be340fdf4110c77e1f86bd13a01fc30c2bb65 (diff)
parent5cfc79deaeabf4af3c767665098a37da9f375eda (diff)
downloadcpython-f28ba369dd068a76ff5b7efac58fdcb5c3eaf4dd.zip
cpython-f28ba369dd068a76ff5b7efac58fdcb5c3eaf4dd.tar.gz
cpython-f28ba369dd068a76ff5b7efac58fdcb5c3eaf4dd.tar.bz2
Issue #20532: Tests which use _testcapi now are marked as CPython only.
Diffstat (limited to 'Lib/test/test_threading.py')
-rw-r--r--Lib/test/test_threading.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/test/test_threading.py b/Lib/test/test_threading.py
index 73839e7..ad363582 100644
--- a/Lib/test/test_threading.py
+++ b/Lib/test/test_threading.py
@@ -3,7 +3,7 @@ Tests for the threading module.
"""
import test.support
-from test.support import verbose, strip_python_stderr, import_module
+from test.support import verbose, strip_python_stderr, import_module, cpython_only
from test.script_helper import assert_python_ok
import random
@@ -11,7 +11,6 @@ import re
import sys
_thread = import_module('_thread')
threading = import_module('threading')
-import _testcapi
import time
import unittest
import weakref
@@ -662,6 +661,7 @@ class ThreadTests(BaseTestCase):
self.assertRegex(err.rstrip(),
b"^sys:1: ResourceWarning: unclosed file ")
+ @cpython_only
def test_frame_tstate_tracing(self):
# Issue #14432: Crash when a generator is created in a C thread that is
# destroyed while the generator is still used. The issue was that a
@@ -690,6 +690,7 @@ class ThreadTests(BaseTestCase):
threading.settrace(noop_trace)
# Create a generator in a C thread which exits after the call
+ import _testcapi
_testcapi.call_in_temporary_c_thread(callback)
# Call the generator in a different Python thread, check that the
@@ -928,6 +929,7 @@ class SubinterpThreadingTests(BaseTestCase):
# The thread was joined properly.
self.assertEqual(os.read(r, 1), b"x")
+ @cpython_only
def test_daemon_threads_fatal_error(self):
subinterp_code = r"""if 1:
import os