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

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"