|
4 | 4 | import shutil
|
5 | 5 | import unittest
|
6 | 6 | import subprocess
|
7 |
| -import sysconfig |
8 | 7 | from test import support
|
9 | 8 |
|
10 | 9 |
|
11 | 10 | SOURCE = os.path.join(os.path.dirname(__file__), 'extension.cpp')
|
12 | 11 | SETUP = os.path.join(os.path.dirname(__file__), 'setup.py')
|
13 | 12 |
|
14 | 13 |
|
15 |
| -# gh-110119: pip does not currently support 't' in the ABI flag use by |
16 |
| -# --disable-gil builds. Once it does, we can remove this skip. |
17 |
| -@unittest.skipIf(support.Py_GIL_DISABLED, |
18 |
| - 'test does not work with --disable-gil') |
| 14 | +# With MSVC, the linker fails with: cannot open file 'python311.lib' |
| 15 | +# https://github.com/python/cpython/pull/32175#issuecomment-1111175897 |
| 16 | +@unittest.skipIf(support.MS_WINDOWS, 'test fails on Windows') |
| 17 | +# Building and running an extension in clang sanitizing mode is not |
| 18 | +# straightforward |
| 19 | +@support.skip_if_sanitizer('test does not work with analyzing builds', |
| 20 | + address=True, memory=True, ub=True, thread=True) |
| 21 | +# the test uses venv+pip: skip if it's not available |
| 22 | +@support.requires_venv_with_pip() |
19 | 23 | @support.requires_subprocess()
|
| 24 | +@support.requires_resource('cpu') |
20 | 25 | class TestCPPExt(unittest.TestCase):
|
21 |
| - @support.requires_resource('cpu') |
22 | 26 | def test_build_cpp11(self):
|
23 | 27 | self.check_build(False, '_testcpp11ext')
|
24 | 28 |
|
25 |
| - @support.requires_resource('cpu') |
26 | 29 | def test_build_cpp03(self):
|
27 | 30 | self.check_build(True, '_testcpp03ext')
|
28 | 31 |
|
29 |
| - # With MSVC, the linker fails with: cannot open file 'python311.lib' |
30 |
| - # https://github.com/python/cpython/pull/32175#issuecomment-1111175897 |
31 |
| - @unittest.skipIf(support.MS_WINDOWS, 'test fails on Windows') |
32 |
| - # Building and running an extension in clang sanitizing mode is not |
33 |
| - # straightforward |
34 |
| - @unittest.skipIf( |
35 |
| - '-fsanitize' in (sysconfig.get_config_var('PY_CFLAGS') or ''), |
36 |
| - 'test does not work with analyzing builds') |
37 |
| - # the test uses venv+pip: skip if it's not available |
38 |
| - @support.requires_venv_with_pip() |
39 | 32 | def check_build(self, std_cpp03, extension_name):
|
40 | 33 | venv_dir = 'env'
|
41 | 34 | with support.setup_venv_with_pip_setuptools_wheel(venv_dir) as python_exe:
|
|
0 commit comments