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

Method test_interpolation

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

Source from the content-addressed store, hash-verified

909 config_class = configparser.ConfigParser
910
911 def test_interpolation(self):
912 cf = self.get_interpolation_config()
913 eq = self.assertEqual
914 eq(cf.get("Foo", "bar"), "something with interpolation (1 step)")
915 eq(cf.get("Foo", "bar9"),
916 "something with lots of interpolation (9 steps)")
917 eq(cf.get("Foo", "bar10"),
918 "something with lots of interpolation (10 steps)")
919 e = self.get_error(cf, configparser.InterpolationDepthError, "Foo", "bar11")
920 if self.interpolation == configparser._UNSET:
921 self.assertEqual(e.args, ("bar11", "Foo",
922 "something %(with11)s lots of interpolation (11 steps)"))
923
924 def test_interpolation_missing_value(self):
925 cf = self.get_interpolation_config()

Callers

nothing calls this directly

Calls 5

eqFunction · 0.85
get_errorMethod · 0.80
getMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected