diff options
Diffstat (limited to 'Lib/test/test_sets.py')
-rw-r--r-- | Lib/test/test_sets.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Lib/test/test_sets.py b/Lib/test/test_sets.py index 4521335c51..cf0cd59dc9 100644 --- a/Lib/test/test_sets.py +++ b/Lib/test/test_sets.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -import unittest, operator, copy +import unittest, operator, copy, pickle from sets import Set, ImmutableSet from test import test_support @@ -74,6 +74,14 @@ class TestBasicOps(unittest.TestCase): for v in self.set: self.assert_(v in self.values) + def test_pickling(self): + p = pickle.dumps(self.set) + print repr(p) + copy = pickle.loads(p) + repr(copy) + self.assertEqual(self.set, copy, + "%s != %s" % (self.set, copy)) + #------------------------------------------------------------------------------ class TestBasicOpsEmpty(TestBasicOps): |