summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_perfmaps.py
diff options
context:
space:
mode:
authorErlend E. Aasland <erlend@python.org>2024-04-03 13:11:36 (GMT)
committerGitHub <noreply@github.com>2024-04-03 13:11:36 (GMT)
commitea94b3b149eeadf33c2f7c46f16dcda0adc7cf4e (patch)
tree7fc58f8dcd7513427c7ea2ff9d7bad523be1118a /Lib/test/test_perfmaps.py
parent2ec6bb4111d2c03c1cac02b27c74beee7e5a2a05 (diff)
downloadcpython-ea94b3b149eeadf33c2f7c46f16dcda0adc7cf4e.zip
cpython-ea94b3b149eeadf33c2f7c46f16dcda0adc7cf4e.tar.gz
cpython-ea94b3b149eeadf33c2f7c46f16dcda0adc7cf4e.tar.bz2
gh-116303: Skip test module dependent tests if test modules are unavailable (#117341)
Diffstat (limited to 'Lib/test/test_perfmaps.py')
-rw-r--r--Lib/test/test_perfmaps.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/test/test_perfmaps.py b/Lib/test/test_perfmaps.py
index a17adb8..d4c6fe0 100644
--- a/Lib/test/test_perfmaps.py
+++ b/Lib/test/test_perfmaps.py
@@ -2,7 +2,11 @@ import os
import sys
import unittest
-from _testinternalcapi import perf_map_state_teardown, write_perf_map_entry
+try:
+ from _testinternalcapi import perf_map_state_teardown, write_perf_map_entry
+except ImportError:
+ raise unittest.SkipTest("requires _testinternalcapi")
+
if sys.platform != 'linux':
raise unittest.SkipTest('Linux only')