Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 56f9844

Browse filesBrowse files
authored
gh-90765: configparser test: Catch deprecation warning (#91480)
1 parent 0ed91a2 commit 56f9844
Copy full SHA for 56f9844

File tree

1 file changed

+3
-1
lines changed
Filter options

1 file changed

+3
-1
lines changed

‎Lib/test/test_configparser.py

Copy file name to clipboardExpand all lines: Lib/test/test_configparser.py
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1028,7 +1028,9 @@ class CustomConfigParser(configparser.ConfigParser):
10281028

10291029
class ConfigParserTestCaseLegacyInterpolation(ConfigParserTestCase):
10301030
config_class = configparser.ConfigParser
1031-
interpolation = configparser.LegacyInterpolation()
1031+
with warnings.catch_warnings():
1032+
warnings.simplefilter("ignore", DeprecationWarning)
1033+
interpolation = configparser.LegacyInterpolation()
10321034

10331035
def test_set_malformatted_interpolation(self):
10341036
cf = self.fromstring("[sect]\n"

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.