MCPcopy Index your code
hub / github.com/python/cpython / test_iterable

Method test_iterable

Lib/test/test_configparser.py:1546–1554  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1544 self.assertEqual(parser["Foo Bar"]["foo"], "newbar")
1545
1546 def test_iterable(self):
1547 lines = textwrap.dedent("""
1548 [Foo Bar]
1549 foo=newbar""").strip().split('\n')
1550 parser = configparser.ConfigParser()
1551 parser.read_file(lines)
1552 self.assertIn("Foo Bar", parser)
1553 self.assertIn("foo", parser["Foo Bar"])
1554 self.assertEqual(parser["Foo Bar"]["foo"], "newbar")
1555
1556 def test_readline_generator(self):
1557 """Issue #11670."""

Callers

nothing calls this directly

Calls 6

assertInMethod · 0.80
splitMethod · 0.45
stripMethod · 0.45
dedentMethod · 0.45
read_fileMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected