diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2014-12-15 12:06:02 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2014-12-15 12:06:02 (GMT) |
commit | 65ee4674e290ba893509f51f192dd1c9aa3a0422 (patch) | |
tree | c1e960162df4444ff18a2ad3aff11d713ef9ea12 /Lib/test/test_sndhdr.py | |
parent | 0e32ea1089059a15b04a40c43bfe671e38ae16e7 (diff) | |
parent | bad1257c96943dcb39584a41e1a178542479df97 (diff) | |
download | cpython-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.py | 5 |
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__': |