From ea94b3b149eeadf33c2f7c46f16dcda0adc7cf4e Mon Sep 17 00:00:00 2001 From: "Erlend E. Aasland" Date: Wed, 3 Apr 2024 15:11:36 +0200 Subject: gh-116303: Skip test module dependent tests if test modules are unavailable (#117341) --- Lib/test/test_poll.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Lib/test/test_poll.py') diff --git a/Lib/test/test_poll.py b/Lib/test/test_poll.py index 1847ae95db9..5675db8d1ca 100644 --- a/Lib/test/test_poll.py +++ b/Lib/test/test_poll.py @@ -172,7 +172,10 @@ class PollTests(unittest.TestCase): @cpython_only def test_poll_c_limits(self): - from _testcapi import USHRT_MAX, INT_MAX, UINT_MAX + try: + from _testcapi import USHRT_MAX, INT_MAX, UINT_MAX + except ImportError: + raise unittest.SkipTest("requires _testcapi") pollster = select.poll() pollster.register(1) -- cgit v1.2.3