summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_traceback.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2014-02-07 08:06:39 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2014-02-07 08:06:39 (GMT)
commit5cfc79deaeabf4af3c767665098a37da9f375eda (patch)
tree2696e5c9674d11398f0d207d58d1fcdd3ee420eb /Lib/test/test_traceback.py
parentfe4ef392d5df73639337f02db2ad8100d615067d (diff)
downloadcpython-5cfc79deaeabf4af3c767665098a37da9f375eda.zip
cpython-5cfc79deaeabf4af3c767665098a37da9f375eda.tar.gz
cpython-5cfc79deaeabf4af3c767665098a37da9f375eda.tar.bz2
Issue #20532: Tests which use _testcapi now are marked as CPython only.
Diffstat (limited to 'Lib/test/test_traceback.py')
-rw-r--r--Lib/test/test_traceback.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/Lib/test/test_traceback.py b/Lib/test/test_traceback.py
index 9af3b92..c38c65b 100644
--- a/Lib/test/test_traceback.py
+++ b/Lib/test/test_traceback.py
@@ -1,12 +1,11 @@
"""Test cases for traceback module"""
-from _testcapi import traceback_print, exception_print
from io import StringIO
import sys
import unittest
import re
from test.support import run_unittest, Error, captured_output
-from test.support import TESTFN, unlink
+from test.support import TESTFN, unlink, cpython_only
import traceback
@@ -173,7 +172,9 @@ class SyntaxTracebackCases(unittest.TestCase):
class TracebackFormatTests(unittest.TestCase):
+ @cpython_only
def test_traceback_format(self):
+ from _testcapi import traceback_print
try:
raise KeyError('blah')
except KeyError:
@@ -360,7 +361,9 @@ class CExcReportingTests(BaseExceptionReportingTests, unittest.TestCase):
# This checks built-in reporting by the interpreter.
#
+ @cpython_only
def get_report(self, e):
+ from _testcapi import exception_print
e = self.get_exception(e)
with captured_output("stderr") as s:
exception_print(e)