8000 bpo-32384: skip the test unless an import succeeds by srinivasreddy · Pull Request #5005 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-32384: skip the test unless an import succeeds #5005

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions Lib/test/test_generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@
import inspect

from test import support

_testcapi = support.import_module('_testcapi')
try:
_testcapi = support.import_module('_testcapi')
except ImportError:
_testcapi = None


# This tests to make sure that if a SIGINT arrives just before we send into a
Expand All @@ -28,6 +30,7 @@ def generator2(self):
else:
return "FAILED"

@unittest.skipUnless(_testcapi is not None, "'_testcapi' is failed to import")
def test_raise_and_yield_from(self):
gen = self.generator1()
gen.send(None)
Expand Down
0