|
17 | 17 | import textwrap |
18 | 18 | import unittest |
19 | 19 | import warnings |
20 | | -from unittest import mock |
21 | 20 |
|
22 | 21 | from test import support |
23 | 22 | from test.support import isolation |
@@ -81,29 +80,6 @@ def tearDownClass(cls): |
81 | 80 | ) |
82 | 81 | assert len(warnings._get_filters()) == orig_filter_len - 2 |
83 | 82 |
|
84 | | - def test_check_sanitizer_config_args(self): |
85 | | - sanitizers = ( |
86 | | - ('address', 'address'), |
87 | | - ('hwaddress', 'hwaddress'), |
88 | | - ('memory', 'memory'), |
89 | | - ('undefined-behavior', 'ub'), |
90 | | - ('thread', 'thread'), |
91 | | - ) |
92 | | - for option, keyword in sanitizers: |
93 | | - for config_arg, expected in ( |
94 | | - (f'--with-{option}-sanitizer=no', False), |
95 | | - (f'--without-{option}-sanitizer', False), |
96 | | - (f'--with-{option}-sanitizer', True), |
97 | | - (f'--with-{option}-sanitizer=yes', True), |
98 | | - ): |
99 | | - with self.subTest(config_arg=config_arg): |
100 | | - config = {'CFLAGS': '', 'CONFIG_ARGS': f"'{config_arg}'"} |
101 | | - with mock.patch.object(sysconfig, 'get_config_var', |
102 | | - side_effect=config.get): |
103 | | - self.assertEqual( |
104 | | - support.check_sanitizer(**{keyword: True}), expected |
105 | | - ) |
106 | | - |
107 | 83 | def test_ignored_deprecations_are_silent(self): |
108 | 84 | """Test support.ignore_deprecations_from() silences warnings""" |
109 | 85 | with warnings.catch_warnings(record=True) as warning_objs: |
|
0 commit comments