Skip to content

Commit 56f9844

Browse files
authored
gh-90765: configparser test: Catch deprecation warning (#91480)
1 parent 0ed91a2 commit 56f9844

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Lib/test/test_configparser.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1028,7 +1028,9 @@ class CustomConfigParser(configparser.ConfigParser):
10281028

10291029
class ConfigParserTestCaseLegacyInterpolation(ConfigParserTestCase):
10301030
config_class = configparser.ConfigParser
1031-
interpolation = configparser.LegacyInterpolation()
1031+
with warnings.catch_warnings():
1032+
warnings.simplefilter("ignore", DeprecationWarning)
1033+
interpolation = configparser.LegacyInterpolation()
10321034

10331035
def test_set_malformatted_interpolation(self):
10341036
cf = self.fromstring("[sect]\n"

0 commit comments

Comments
 (0)