From 56f98440148e4257aa5b27150ce2269c98cea0ea Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Mon, 2 May 2022 20:22:26 +0300 Subject: gh-90765: configparser test: Catch deprecation warning (#91480) --- Lib/test/test_configparser.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Lib/test/test_configparser.py b/Lib/test/test_configparser.py index efd98ff..59c4b27 100644 --- a/Lib/test/test_configparser.py +++ b/Lib/test/test_configparser.py @@ -1028,7 +1028,9 @@ class ConfigParserTestCaseNoInterpolation(BasicTestCase, unittest.TestCase): class ConfigParserTestCaseLegacyInterpolation(ConfigParserTestCase): config_class = configparser.ConfigParser - interpolation = configparser.LegacyInterpolation() + with warnings.catch_warnings(): + warnings.simplefilter("ignore", DeprecationWarning) + interpolation = configparser.LegacyInterpolation() def test_set_malformatted_interpolation(self): cf = self.fromstring("[sect]\n" -- cgit v0.12