summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorMichael W. Hudson <mwh@python.net>2002-03-07 10:12:38 (GMT)
committerMichael W. Hudson <mwh@python.net>2002-03-07 10:12:38 (GMT)
commit38983bc5e3af22b5b923f809bcb06c0176123c0e (patch)
tree788bd7d91c171d7b68613fa11e74bcf03761ef35 /Lib
parent2b85b37410ccead36dd687204ef9a76765c21546 (diff)
downloadcpython-38983bc5e3af22b5b923f809bcb06c0176123c0e.zip
cpython-38983bc5e3af22b5b923f809bcb06c0176123c0e.tar.gz
cpython-38983bc5e3af22b5b923f809bcb06c0176123c0e.tar.bz2
backport my checkin of
revision 1.14 of pickletester.py Special support for pickling os.stat and os.stat_vfs results portably (the types come from different modules on different platforms). Added tests for pickling these types. May be a bugfix candidate.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/pickletester.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/Lib/test/pickletester.py b/Lib/test/pickletester.py
index e2d2580..e16428f 100644
--- a/Lib/test/pickletester.py
+++ b/Lib/test/pickletester.py
@@ -254,6 +254,17 @@ class AbstractPickleTests(unittest.TestCase):
s = self.dumps(t)
u = self.loads(s)
self.assertEqual(t, u)
+ import os
+ if hasattr(os, "stat"):
+ t = os.stat(os.curdir)
+ s = self.dumps(t)
+ u = self.loads(s)
+ self.assertEqual(t, u)
+ if hasattr(os, "statvfs"):
+ t = os.statvfs(os.curdir)
+ s = self.dumps(t)
+ u = self.loads(s)
+ self.assertEqual(t, u)
class AbstractPickleModuleTests(unittest.TestCase):