Skip to content

Commit b620e50

Browse files
authored
[3.13] gh-127906: Backport test_cppext changes from the main branch (#127914)
1 parent 8384279 commit b620e50

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

Lib/test/test_cppext/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ def run_cmd(operation, cmd):
7676
cmd = [python_exe, '-X', 'dev',
7777
'-m', 'pip', 'install', '--no-build-isolation',
7878
os.path.abspath(pkg_dir)]
79+
if support.verbose:
80+
cmd.append('-v')
7981
run_cmd('Install', cmd)
8082

8183
# Do a reference run. Until we test that running python

Lib/test/test_cppext/setup.py

+8-2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111

1212
SOURCE = 'extension.cpp'
13+
1314
if not support.MS_WINDOWS:
1415
# C++ compiler flags for GCC and clang
1516
CPPFLAGS = [
@@ -19,8 +20,13 @@
1920
'-Werror',
2021
]
2122
else:
22-
# Don't pass any compiler flag to MSVC
23-
CPPFLAGS = []
23+
# MSVC compiler flags
24+
CPPFLAGS = [
25+
# Display warnings level 1 to 4
26+
'/W4',
27+
# Treat all compiler warnings as compiler errors
28+
'/WX',
29+
]
2430

2531

2632
def main():

0 commit comments

Comments
 (0)