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

Method test_defaults

Lib/test/test_email/test_policy.py:67–73  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

65 policies[new_policy]['header_factory'] = new_policy.header_factory
66
67 def test_defaults(self):
68 for policy, expected in self.policies.items():
69 for attr, value in expected.items():
70 with self.subTest(policy=policy, attr=attr):
71 self.assertEqual(getattr(policy, attr), value,
72 ("change {} docs/docstrings if defaults have "
73 "changed").format(policy))
74
75 def test_all_attributes_covered(self):
76 for policy, expected in self.policies.items():

Callers

nothing calls this directly

Calls 4

itemsMethod · 0.45
subTestMethod · 0.45
assertEqualMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected