mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-33251: Prevent ConfigParser.items returning items present in vars. (#6446)
* bpo-33251: ConfigParser.items no longer returns items present in vars. Documentation for `ConfigParser.items()` states: 'Items present in vars no longer appear in the result.' This fix aligns behaviour to that specified in the documentation.
This commit is contained in:
parent
25038ecfb6
commit
1d4a733cce
3 changed files with 6 additions and 5 deletions
|
@ -915,8 +915,7 @@ class ConfigParserTestCase(BasicTestCase, unittest.TestCase):
|
|||
self.check_items_config([('default', '<default>'),
|
||||
('getdefault', '|<default>|'),
|
||||
('key', '|value|'),
|
||||
('name', 'value'),
|
||||
('value', 'value')])
|
||||
('name', 'value')])
|
||||
|
||||
def test_safe_interpolation(self):
|
||||
# See http://www.python.org/sf/511737
|
||||
|
@ -1093,8 +1092,7 @@ class RawConfigParserTestCase(BasicTestCase, unittest.TestCase):
|
|||
self.check_items_config([('default', '<default>'),
|
||||
('getdefault', '|%(default)s|'),
|
||||
('key', '|%(name)s|'),
|
||||
('name', '%(value)s'),
|
||||
('value', 'value')])
|
||||
('name', '%(value)s')])
|
||||
|
||||
def test_set_nonstring_types(self):
|
||||
cf = self.newconfig()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue