Skip to content

gh-140210: Make test_sysconfig.test_parse_makefile_renamed_vars ignore environment variables#140213

Merged
brettcannon merged 1 commit into
python:mainfrom
hroncok:test_parse_makefile_renamed_vars
Nov 27, 2025
Merged

gh-140210: Make test_sysconfig.test_parse_makefile_renamed_vars ignore environment variables#140213
brettcannon merged 1 commit into
python:mainfrom
hroncok:test_parse_makefile_renamed_vars

Conversation

@hroncok

@hroncok hroncok commented Oct 16, 2025

Copy link
Copy Markdown
Contributor

The test did not expect it could be run with e.g. CFLAGS set to a custom value.

Fixes #140210

… ignore environment variables

The test did not expect it could be run with e.g. CFLAGS set to a custom value.

Fixes python#140210

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

I confirm that I can easily reproduce the issue by setting CFLAGS environment variable:

$ CFLAGS="xxx" ./python -m test test_sysconfig -m test_parse_makefile_renamed_vars -v
...
-  'var1': 'xxx',
?           ^^^

+  'var1': '-Wall',
?           ^^^^^
...

With this PR, I can no longer reproduce the issue.

cc @serhiy-storchaka

@brettcannon brettcannon merged commit 69f54ce into python:main Nov 27, 2025
53 checks passed
@hroncok hroncok deleted the test_parse_makefile_renamed_vars branch November 27, 2025 18:01
@hroncok

hroncok commented Nov 27, 2025

Copy link
Copy Markdown
Contributor Author

Thanks for merging.

@vstinner

Copy link
Copy Markdown
Member

Oh sorry, I forgot to merge this PR.

@hroncok

hroncok commented Nov 27, 2025

Copy link
Copy Markdown
Contributor Author

I forgot I opened it, so I think it's fine :D

StanFromIreland pushed a commit to StanFromIreland/cpython that referenced this pull request Dec 6, 2025
… ignore environment variables (python#140213)

The test did not expect it could be run with e.g. CFLAGS set to a custom value.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test_sysconfig test_parse_makefile_renamed_vars fails when $CFLAGS is set

4 participants