Skip to content

Commit 47396ab

Browse files
Aaron WieczorekAaron Wieczorek
authored andcommitted
Hardcoding pickle.HIGHEST_PROTOCOL in test slightly cleaner
1 parent ec61e9c commit 47396ab

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

Lib/test/pickletester.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4280,8 +4280,7 @@ def __bool__(self):
42804280
buf.release()
42814281
return True
42824282

4283-
max_proto = pickle.HIGHEST_PROTOCOL
4284-
for proto in range(5, max_proto + 1):
4283+
for proto in range(5, pickle.HIGHEST_PROTOCOL + 1):
42854284
obj, sub = factory()
42864285
buf = pickle.PickleBuffer(obj)
42874286
buffer_callback = lambda _: R()

0 commit comments

Comments
 (0)