gh-90765: configparser test: Catch deprecation warning (#91480)

This commit is contained in:
Hugo van Kemenade 2022-05-02 20:22:26 +03:00 committed by GitHub
parent 0ed91a26fe
commit 56f9844014
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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"