MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_io

Method test_io

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

Source from the content-addressed store, hash-verified

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