diff options
| author | Serhiy Storchaka <storchaka@gmail.com> | 2014-12-15 14:06:02 +0200 |
|---|---|---|
| committer | Serhiy Storchaka <storchaka@gmail.com> | 2014-12-15 14:06:02 +0200 |
| commit | 65ee4674e290ba893509f51f192dd1c9aa3a0422 (patch) | |
| tree | c1e960162df4444ff18a2ad3aff11d713ef9ea12 /Lib/test/test_sndhdr.py | |
| parent | 0e32ea1089059a15b04a40c43bfe671e38ae16e7 (diff) | |
| parent | bad1257c96943dcb39584a41e1a178542479df97 (diff) | |
| download | cpython-git-65ee4674e290ba893509f51f192dd1c9aa3a0422.tar.gz | |
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 361f70f888..426417c038 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__': |
