mirror of
https://github.com/python/cpython.git
synced 2025-10-10 00:43:41 +00:00
bpo-46607: Add DeprecationWarning for LegacyInterpolation, deprecated in docs since 3.2 (GH-30927)
This commit is contained in:
parent
cfb849a326
commit
75280944e5
4 changed files with 26 additions and 0 deletions
|
@ -1666,6 +1666,14 @@ class CoverageOneHundredTestCase(unittest.TestCase):
|
|||
for warning in w:
|
||||
self.assertTrue(warning.category is DeprecationWarning)
|
||||
|
||||
def test_legacyinterpolation_deprecation(self):
|
||||
with warnings.catch_warnings(record=True) as w:
|
||||
warnings.simplefilter("always", DeprecationWarning)
|
||||
configparser.LegacyInterpolation()
|
||||
self.assertGreaterEqual(len(w), 1)
|
||||
for warning in w:
|
||||
self.assertIs(warning.category, DeprecationWarning)
|
||||
|
||||
def test_sectionproxy_repr(self):
|
||||
parser = configparser.ConfigParser()
|
||||
parser.read_string("""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue