We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3055c94 commit 4cc3eb4Copy full SHA for 4cc3eb4
Lib/test/test_generators.py
@@ -9,12 +9,18 @@
9
10
from test import support
11
12
-_testcapi = support.import_module('_testcapi')
+try:
13
+ import _testcapi
14
+except ImportError:
15
+ _testcapi = None
16
17
18
# This tests to make sure that if a SIGINT arrives just before we send into a
19
# yield from chain, the KeyboardInterrupt is raised in the innermost
20
# generator (see bpo-30039).
21
+@unittest.skipUnless(_testcapi is not None and
22
+ hasattr(_testcapi, "raise_SIGINT_then_send_None"),
23
+ "needs _testcapi.raise_SIGINT_then_send_None")
24
class SignalAndYieldFromTest(unittest.TestCase):
25
26
def generator1(self):
0 commit comments