8000 gh-66449: Add support to unnamed sections in ConfigParser by pslacerda · Pull Request #2735 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-66449: Add support to unnamed sections in ConfigParser #2735

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 9 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Minor fix
  • Loading branch information
pslacerda committed Oct 5, 2022
commit 1e0ceb199e4b0803a0da8a6be883d290ea8f1861
6 changes: 3 additions & 3 deletions Lib/test/test_configparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -2138,7 +2138,7 @@ def test_only_top_level(self):

output = io.StringIO()
cfg1.write(output)
cfg2 = self.fromstring(output.getvalue())
cfg2 = self.fromstring(configparser.TOP_LEVEL, output.getvalue())

self.assertEqual([], cfg1.sections())
self.assertEqual('1', cfg2[configparser.TOP_LEVEL]['a'])
Expand All @@ -2157,7 +2157,7 @@ def test_only_regular(self):

output = io.StringIO()
cfg1.write(output)
cfg2 = self.fromstring(output.getvalue())
cfg2 = self.fromstring(configparser.TOP_LEVEL, output.getvalue())

self.assertEqual(['sect1'], cfg2.sections())
self.assertEqual('1', cfg2['sect1']['a'])
Expand All @@ -2181,7 +2181,7 @@ def test_top_level_and_regular(self):

output = io.StringIO()
cfg1.write(output)
cfg2 = self.fromstring(output.getvalue())
cfg2 = self.fromstring(configparser.TOP_LEVEL, output.getvalue())

self.assertEqual(['sect1'], cfg1.sections())
self.assertEqual('1', cfg2[configparser.TOP_LEVEL]['a'])
Expand Down
0