diff options
author | Just van Rossum <just@letterror.com> | 2003-07-01 20:22:30 (GMT) |
---|---|---|
committer | Just van Rossum <just@letterror.com> | 2003-07-01 20:22:30 (GMT) |
commit | bcc58e87e8595bcb374947a30e0bf3d62771abbf (patch) | |
tree | 0877243751110c5abe22671bf37858330cb8bd35 /Lib/test/test_plistlib.py | |
parent | 94af32e24494c849c603bd30320caa940b3f9bb0 (diff) | |
download | cpython-bcc58e87e8595bcb374947a30e0bf3d62771abbf.zip cpython-bcc58e87e8595bcb374947a30e0bf3d62771abbf.tar.gz cpython-bcc58e87e8595bcb374947a30e0bf3d62771abbf.tar.bz2 |
- added (c)StringIO tests; cStringIO usage failed in the previous
version of plistlib.py (r1.2)
Diffstat (limited to 'Lib/test/test_plistlib.py')
-rw-r--r-- | Lib/test/test_plistlib.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Lib/test/test_plistlib.py b/Lib/test/test_plistlib.py index 75cd457..6bd73e2 100644 --- a/Lib/test/test_plistlib.py +++ b/Lib/test/test_plistlib.py @@ -49,6 +49,22 @@ class TestPlistlib(unittest.TestCase): pl2 = plistlib.Plist.fromFile(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())) + 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())) + self.assertEqual(dict(pl), dict(pl2)) + def test_main(): |