Commit 4cc3eb48 authored by Isaiah Peng's avatar Isaiah Peng Committed by Berker Peksag

bpo-32384: Skip test when _testcapi isn't available (GH-4940)

parent 3055c947
......@@ -9,12 +9,18 @@ import inspect
from test import support
_testcapi = support.import_module('_testcapi')
try:
import _testcapi
except ImportError:
_testcapi = None
# This tests to make sure that if a SIGINT arrives just before we send into a
# yield from chain, the KeyboardInterrupt is raised in the innermost
# generator (see bpo-30039).
@unittest.skipUnless(_testcapi is not None and
hasattr(_testcapi, "raise_SIGINT_then_send_None"),
"needs _testcapi.raise_SIGINT_then_send_None")
class SignalAndYieldFromTest(unittest.TestCase):
def generator1(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment