summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorMichael W. Hudson <mwh@python.net>2002-03-06 17:11:18 (GMT)
committerMichael W. Hudson <mwh@python.net>2002-03-06 17:11:18 (GMT)
commit0e02530a798807db572968ba914ae3694d71eb91 (patch)
tree9e7fad6916145181df1cc9ee59eba394eb753989 /Lib/test
parentce358e3015bc8cafdf949dee624b01f4a38bfad2 (diff)
downloadcpython-0e02530a798807db572968ba914ae3694d71eb91.zip
cpython-0e02530a798807db572968ba914ae3694d71eb91.tar.gz
cpython-0e02530a798807db572968ba914ae3694d71eb91.tar.bz2
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/test')
-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):