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

Method test_frozendict

Lib/test/test_plistlib.py:795–812  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

793 self.assertIsNot(pl2['first'], pl2['second'])
794
795 def test_frozendict(self):
796 pl = frozendict(
797 aString="Doodah",
798 anInt=728,
799 aDict=frozendict(
800 anotherString="hello",
801 aTrueValue=True,
802 ),
803 aList=["A", "B", 12],
804 )
805
806 for fmt in ALL_FORMATS:
807 with self.subTest(fmt=fmt):
808 data = plistlib.dumps(pl, fmt=fmt)
809 pl2 = plistlib.loads(data)
810 self.assertEqual(pl2, dict(pl))
811 self.assertIsInstance(pl2, dict)
812 self.assertIsInstance(pl2['aDict'], dict)
813
814 def test_controlcharacters(self):
815 for i in range(128):

Callers

nothing calls this directly

Calls 6

frozendictClass · 0.85
assertIsInstanceMethod · 0.80
subTestMethod · 0.45
dumpsMethod · 0.45
loadsMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected