From: Hugo van Kemenade Date: Mon, 2 May 2022 17:22:26 +0000 (+0300) Subject: gh-90765: configparser test: Catch deprecation warning (#91480) X-Git-Tag: v3.11.0b1~123 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=56f98440148e4257aa5b27150ce2269c98cea0ea;p=thirdparty%2FPython%2Fcpython.git gh-90765: configparser test: Catch deprecation warning (#91480) --- diff --git a/Lib/test/test_configparser.py b/Lib/test/test_configparser.py index efd98ffb67a5..59c4b275cb46 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"