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 8fa36b6 commit 5e8c526Copy full SHA for 5e8c526
Lib/test/test_generators.py
@@ -10,12 +10,18 @@
10
11
from test import support
12
13
-_testcapi = support.import_module('_testcapi')
+try:
14
+ import _testcapi
15
+except ImportError:
16
+ _testcapi = None
17
18
19
# This tests to make sure that if a SIGINT arrives just before we send into a
20
# yield from chain, the KeyboardInterrupt is raised in the innermost
21
# generator (see bpo-30039).
22
+@unittest.skipUnless(_testcapi is not None and
23
+ hasattr(_testcapi, "raise_SIGINT_then_send_None"),
24
+ "needs _testcapi.raise_SIGINT_then_send_None")
25
class SignalAndYieldFromTest(unittest.TestCase):
26
27
def generator1(self):
0 commit comments