Skip to content

Commit 8f370c8

Browse files
committed
Test all marshal versions
1 parent b3fc6f5 commit 8f370c8

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

Lib/test/test_marshal.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,10 @@ def test_bytes(self):
118118

119119
@support.cpython_only
120120
def test_bytes_singleton(self):
121-
for sample in [b"", b"x"]:
122-
new = marshal.loads(marshal.dumps(sample))
123-
self.assertIs(new, sample)
121+
for version in range(marshal.version + 1):
122+
for sample in [b"", b"x"]:
123+
new = marshal.loads(marshal.dumps(sample, version))
124+
self.assertIs(new, sample)
124125

125126

126127
class ExceptionTestCase(unittest.TestCase):

0 commit comments

Comments
 (0)