]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
GH-128055: fix test_sysconfigdata_json outside the builddir (#128070)
authorFilipe Laíns 🇵🇸 <lains@riseup.net>
Wed, 2 Apr 2025 05:44:43 +0000 (06:44 +0100)
committerGitHub <noreply@github.com>
Wed, 2 Apr 2025 05:44:43 +0000 (05:44 +0000)
Lib/test/test_sysconfig.py
Misc/NEWS.d/next/Library/2024-12-18-15-51-09.gh-issue-128055.0c_Noq.rst [new file with mode: 0644]

index 3738914cf17de8bd8d745cf5eadeaf0593f6beed..cc11eade2e3426e04decf20927af84d968e74961 100644 (file)
@@ -643,7 +643,8 @@ class TestSysConfig(unittest.TestCase, VirtualEnvironmentMixin):
 
         system_config_vars = get_config_vars()
 
-        ignore_keys = set()
+        # Keys dependent on uncontrollable external context
+        ignore_keys = {'userbase'}
         # Keys dependent on Python being run outside the build directrory
         if sysconfig.is_python_build():
             ignore_keys |= {'srcdir'}
diff --git a/Misc/NEWS.d/next/Library/2024-12-18-15-51-09.gh-issue-128055.0c_Noq.rst b/Misc/NEWS.d/next/Library/2024-12-18-15-51-09.gh-issue-128055.0c_Noq.rst
new file mode 100644 (file)
index 0000000..4f7be59
--- /dev/null
@@ -0,0 +1,2 @@
+Fix ``test.test_sysconfig.test_sysconfigdata_json`` when running outside
+the build directory (eg. after installing).