File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ Restrictions
108108 A subclass of :class: `collections.abc.MutableMapping ` which stores pickled
109109 values in the *dict * object.
110110
111- By default, version 0 pickles are used to serialize values. The version of the
111+ By default, version 3 pickles are used to serialize values. The version of the
112112 pickle protocol can be specified with the *protocol * parameter. See the
113113 :mod: `pickle ` documentation for a discussion of the pickle protocols.
114114
Original file line number Diff line number Diff line change @@ -162,6 +162,10 @@ def test_with(self):
162162 else :
163163 self .fail ('Closed shelf should not find a key' )
164164
165+ def test_default_protocol (self ):
166+ with shelve .Shelf ({}) as s :
167+ self .assertEqual (s ._protocol , 3 )
168+
165169from test import mapping_tests
166170
167171class TestShelveBase (mapping_tests .BasicTestMappingProtocol ):
You can’t perform that action at this time.
0 commit comments