summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_sndhdr.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2014-12-15 12:06:02 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2014-12-15 12:06:02 (GMT)
commit65ee4674e290ba893509f51f192dd1c9aa3a0422 (patch)
treec1e960162df4444ff18a2ad3aff11d713ef9ea12 /Lib/test/test_sndhdr.py
parent0e32ea1089059a15b04a40c43bfe671e38ae16e7 (diff)
parentbad1257c96943dcb39584a41e1a178542479df97 (diff)
downloadcpython-65ee4674e290ba893509f51f192dd1c9aa3a0422.zip
cpython-65ee4674e290ba893509f51f192dd1c9aa3a0422.tar.gz
cpython-65ee4674e290ba893509f51f192dd1c9aa3a0422.tar.bz2
Issue #22777: Test pickling with all protocols.
Diffstat (limited to 'Lib/test/test_sndhdr.py')
-rw-r--r--Lib/test/test_sndhdr.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/test/test_sndhdr.py b/Lib/test/test_sndhdr.py
index 361f70f..426417c 100644
--- a/Lib/test/test_sndhdr.py
+++ b/Lib/test/test_sndhdr.py
@@ -28,8 +28,9 @@ class TestFormats(unittest.TestCase):
def test_pickleable(self):
filename = findfile('sndhdr.aifc', subdir="sndhdrdata")
what = sndhdr.what(filename)
- dump = pickle.dumps(what)
- self.assertEqual(pickle.loads(dump), what)
+ for proto in range(pickle.HIGHEST_PROTOCOL + 1):
+ dump = pickle.dumps(what, proto)
+ self.assertEqual(pickle.loads(dump), what)
if __name__ == '__main__':