]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.10] gh-104472: Skip `test_subprocess.ProcessTestCase.test_empty_env` if ASAN is...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 19 May 2023 21:22:44 +0000 (14:22 -0700)
committerGitHub <noreply@github.com>
Fri, 19 May 2023 21:22:44 +0000 (14:22 -0700)
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@users.noreply.github.com>
Lib/test/test_subprocess.py

index 52540acf7e6d68a6f5257d5e261b25bca0a1045a..139ef41e57370bef5059a04ea949acf40c8443c8 100644 (file)
@@ -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
@@ -774,6 +775,8 @@ class ProcessTestCase(BaseTestCase):
     @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."""