[Python-checkins] [3.11] gh-104472: Skip `test_subprocess.ProcessTestCase.test_empty_env` if ASAN is enabled (GH-104667) (#104673)

gpshead webhook-mailer at python.org
Fri May 19 17:48:14 EDT 2023


https://github.com/python/cpython/commit/2801b3f8f753bae137a974f0de8aee946cb1fca6
commit: 2801b3f8f753bae137a974f0de8aee946cb1fca6
branch: 3.11
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: gpshead <greg at krypto.org>
date: 2023-05-19T21:48:07Z
summary:

[3.11] gh-104472: Skip `test_subprocess.ProcessTestCase.test_empty_env` if ASAN is enabled (GH-104667) (#104673)

gh-104472: Skip `test_subprocess.ProcessTestCase.test_empty_env` if ASAN is enabled (GH-104667)

Skip test_subprocess.ProcessTestCase.test_empty_env if ASAN is enabled.
(cherry picked from commit c3f43bfb4bec39ff8f2c36d861a3c3a243bcb3af)

Co-authored-by: chgnrdv <52372310+chgnrdv at users.noreply.github.com>

files:
M Lib/test/test_subprocess.py

diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py
index 727b0e6dc578..846f76ba6d73 100644
--- a/Lib/test/test_subprocess.py
+++ b/Lib/test/test_subprocess.py
@@ -1,6 +1,7 @@
 import unittest
 from unittest import mock
 from test import support
+from test.support import check_sanitizer
 from test.support import import_helper
 from test.support import os_helper
 from test.support import warnings_helper
@@ -789,6 +790,8 @@ def test_env(self):
     @unittest.skipIf(sysconfig.get_config_var('Py_ENABLE_SHARED') == 1,
                      'The Python shared library cannot be loaded '
                      'with an empty environment.')
+    @unittest.skipIf(check_sanitizer(address=True),
+                     'AddressSanitizer adds to the environment.')
     def test_empty_env(self):
         """Verify that env={} is as empty as possible."""
 



More information about the Python-checkins mailing list