Skip to content

Commit d7972ff

Browse files
committed
Add simple tests
1 parent 3eb714a commit d7972ff

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Lib/test/pickletester.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3100,6 +3100,15 @@ def test_float_format(self):
31003100
# make sure that floats are formatted locale independent with proto 0
31013101
self.assertEqual(self.dumps(1.2, 0)[0:3], b'F1.')
31023102

3103+
def test_frozendict(self):
3104+
for proto in range(2, pickle.HIGHEST_PROTOCOL + 1):
3105+
for fd in (
3106+
frozendict(),
3107+
frozendict(x=1, y=2),
3108+
):
3109+
p = self.dumps(fd, proto)
3110+
self.assert_is_copy(fd, self.loads(p))
3111+
31033112
def test_reduce(self):
31043113
for proto in protocols:
31053114
with self.subTest(proto=proto):

0 commit comments

Comments
 (0)