aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_cppext.py
diff options
context:
space:
mode:
authorPetr Viktorin <encukou@gmail.com>2022-07-14 11:57:18 +0200
committerGitHub <noreply@github.com>2022-07-14 11:57:18 +0200
commit6cbb57f62d345d7a5d6aeb1b3b5d37a845344d5e (patch)
tree4a36bb68bad648cac32fe0e49b9888dd9616826f /Lib/test/test_cppext.py
parent81dca70d704d0834d8c30580e648a973250b2973 (diff)
downloadcpython-6cbb57f62d345d7a5d6aeb1b3b5d37a845344d5e.tar.gz
cpython-6cbb57f62d345d7a5d6aeb1b3b5d37a845344d5e.zip
gh-94731: Revert to C-style casts for _Py_CAST (GH-94782)
Co-authored-by: da-woods <dw-git@d-woods.co.uk>
Diffstat (limited to 'Lib/test/test_cppext.py')
-rw-r--r--Lib/test/test_cppext.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_cppext.py b/Lib/test/test_cppext.py
index 2c54d337116..465894d24e7 100644
--- a/Lib/test/test_cppext.py
+++ b/Lib/test/test_cppext.py
@@ -4,6 +4,7 @@ import os.path
import sys
import unittest
import subprocess
+import sysconfig
from test import support
from test.support import os_helper
@@ -25,6 +26,11 @@ class TestCPPExt(unittest.TestCase):
# With MSVC, the linker fails with: cannot open file 'python311.lib'
# https://github.com/python/cpython/pull/32175#issuecomment-1111175897
@unittest.skipIf(MS_WINDOWS, 'test fails on Windows')
+ # Building and running an extension in clang sanitizing mode is not
+ # straightforward
+ @unittest.skipIf(
+ '-fsanitize' in (sysconfig.get_config_var('PY_CFLAGS') or ''),
+ 'test does not work with analyzing builds')
# the test uses venv+pip: skip if it's not available
@support.requires_venv_with_pip()
def check_build(self, std_cpp03, extension_name):