Skip to content

Commit 860e4a1

Browse files
committed
resolve comments
1 parent ae883aa commit 860e4a1

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Lib/test/test_configparser.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1004,10 +1004,9 @@ def test_repr(self):
10041004
cf.add_section("sect6")
10051005
cf.set("sect1", "option1", "foo")
10061006
cf.set("sect2", "option2", "bar")
1007-
cf.read_string("")
1007+
cf.read_string("") # To trigger the loading of sources
10081008

10091009
dict_type = type(cf._dict).__name__
1010-
classname = cf.__class__.__name__
10111010
params = {
10121011
'dict_type': dict_type,
10131012
'allow_no_value': True,
@@ -1022,7 +1021,7 @@ def test_repr(self):
10221021
'sections': ['sect1', 'sect2', 'sect3', 'sect4', 'sect5'],
10231022
'sections_truncated': '...and 1 more',
10241023
}
1025-
expected = f"<{classname}({params=}, {state=})>"
1024+
expected = f"<{type(cf).__name__}({params=}, {state=})>"
10261025
self.assertEqual(repr(cf), expected)
10271026

10281027
def test_add_section_default(self):

0 commit comments

Comments
 (0)