summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugo van Kemenade <hugovk@users.noreply.github.com>2022-05-02 17:22:26 (GMT)
committerGitHub <noreply@github.com>2022-05-02 17:22:26 (GMT)
commit56f98440148e4257aa5b27150ce2269c98cea0ea (patch)
tree69226d08b543ffb606c5e1f95a27ae6721cac7d0
parent0ed91a26fed8cd78b04b814ef2b402f000b0538c (diff)
downloadcpython-56f98440148e4257aa5b27150ce2269c98cea0ea.zip
cpython-56f98440148e4257aa5b27150ce2269c98cea0ea.tar.gz
cpython-56f98440148e4257aa5b27150ce2269c98cea0ea.tar.bz2
gh-90765: configparser test: Catch deprecation warning (#91480)
-rw-r--r--Lib/test/test_configparser.py4
1 files changed, 3 insertions, 1 deletions
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"