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

Method test_io

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

Source from the content-addressed store, hash-verified

445 self.assertEqual(pl["aDict"]["aFalseValue"], False)
446
447 def test_io(self):
448 pl = self._create()
449 with open(os_helper.TESTFN, 'wb') as fp:
450 plistlib.dump(pl, fp)
451
452 with open(os_helper.TESTFN, 'rb') as fp:
453 pl2 = plistlib.load(fp)
454
455 self.assertEqual(dict(pl), dict(pl2))
456
457 self.assertRaises(AttributeError, plistlib.dump, pl, 'filename')
458 self.assertRaises(AttributeError, plistlib.load, 'filename')
459
460 def test_invalid_type(self):
461 pl = [ object() ]

Callers

nothing calls this directly

Calls 6

_createMethod · 0.95
openFunction · 0.50
dumpMethod · 0.45
loadMethod · 0.45
assertEqualMethod · 0.45
assertRaisesMethod · 0.45

Tested by

no test coverage detected