summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorJust van Rossum <just@letterror.com>2004-10-02 14:06:18 (GMT)
committerJust van Rossum <just@letterror.com>2004-10-02 14:06:18 (GMT)
commit16c3e08931abe0a0f24876fee04709ee21009133 (patch)
treef5c32e8a0d3d37e55770481e444a950f7694452d /Lib
parent974d757af15c22049a2aaa8cecf1456cd79d6397 (diff)
downloadcpython-16c3e08931abe0a0f24876fee04709ee21009133.zip
cpython-16c3e08931abe0a0f24876fee04709ee21009133.tar.gz
cpython-16c3e08931abe0a0f24876fee04709ee21009133.tar.bz2
use new readPlist() and writePlist() functions
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_plistlib.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/Lib/test/test_plistlib.py b/Lib/test/test_plistlib.py
index 6bd73e2..4a2e48d 100644
--- a/Lib/test/test_plistlib.py
+++ b/Lib/test/test_plistlib.py
@@ -14,7 +14,7 @@ class TestPlistlib(unittest.TestCase):
pass
def _create(self):
- pl = plistlib.Plist(
+ pl = plistlib.Dict(
aString="Doodah",
aList=["A", "B", 12, 32.1, [1, 2, 3]],
aFloat = 0.1,
@@ -45,24 +45,24 @@ class TestPlistlib(unittest.TestCase):
def test_io(self):
pl = self._create()
- pl.write(test_support.TESTFN)
- pl2 = plistlib.Plist.fromFile(test_support.TESTFN)
+ plistlib.writePlist(pl, test_support.TESTFN)
+ pl2 = plistlib.readPlist(test_support.TESTFN)
self.assertEqual(dict(pl), dict(pl2))
def test_stringio(self):
from StringIO import StringIO
f = StringIO()
pl = self._create()
- pl.write(f)
- pl2 = plistlib.Plist.fromFile(StringIO(f.getvalue()))
+ plistlib.writePlist(pl, f)
+ pl2 = plistlib.readPlist(StringIO(f.getvalue()))
self.assertEqual(dict(pl), dict(pl2))
def test_cstringio(self):
from cStringIO import StringIO
f = StringIO()
pl = self._create()
- pl.write(f)
- pl2 = plistlib.Plist.fromFile(StringIO(f.getvalue()))
+ plistlib.writePlist(pl, f)
+ pl2 = plistlib.readPlist(StringIO(f.getvalue()))
self.assertEqual(dict(pl), dict(pl2))