From b17442112d745aa800e05ce52d50a52f8017d90b Mon Sep 17 00:00:00 2001 From: Chih-Hsuan Yen Date: Mon, 18 Mar 2019 00:22:10 +0800 Subject: [PATCH] bpo-36235: make test_customize_compiler more robust This test was failing if $CPPFLAGS is set when building python. --- Lib/distutils/tests/test_sysconfig.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Lib/distutils/tests/test_sysconfig.py b/Lib/distutils/tests/test_sysconfig.py index 4bf6a067d4d926..8ad5b5bde95d2a 100644 --- a/Lib/distutils/tests/test_sysconfig.py +++ b/Lib/distutils/tests/test_sysconfig.py @@ -81,6 +81,7 @@ def test_customize_compiler(self): os.environ['CC'] = 'my_cc' os.environ['ARFLAGS'] = '--myarflags' os.environ['CFLAGS'] = '--mycflags' + os.environ.pop('CPPFLAGS', None) # make sure AR gets caught class compiler: