diff options
author | Raymond Hettinger <python@rcn.com> | 2004-12-05 03:58:17 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2004-12-05 03:58:17 (GMT) |
commit | 1bc82f891c2ed0c4b062158d2c8339fb90406395 (patch) | |
tree | f2c67a20e814bafd37095e650157261d02e654d7 /Lib/test/test_shelve.py | |
parent | 7cf9ce24409efb70efde08e350a4170dc98008a1 (diff) | |
download | cpython-1bc82f891c2ed0c4b062158d2c8339fb90406395.zip cpython-1bc82f891c2ed0c4b062158d2c8339fb90406395.tar.gz cpython-1bc82f891c2ed0c4b062158d2c8339fb90406395.tar.bz2 |
Removed deprecated method arguments from the shelve module.
Diffstat (limited to 'Lib/test/test_shelve.py')
-rw-r--r-- | Lib/test/test_shelve.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Lib/test/test_shelve.py b/Lib/test/test_shelve.py index e3f237d..447d06d 100644 --- a/Lib/test/test_shelve.py +++ b/Lib/test/test_shelve.py @@ -10,7 +10,7 @@ class TestCase(unittest.TestCase): def test_ascii_file_shelf(self): try: - s = shelve.open(self.fn, binary=False) + s = shelve.open(self.fn, protocol=0) s['key1'] = (1,2,3,4) self.assertEqual(s['key1'], (1,2,3,4)) s.close() @@ -20,7 +20,7 @@ class TestCase(unittest.TestCase): def test_binary_file_shelf(self): try: - s = shelve.open(self.fn, binary=True) + s = shelve.open(self.fn, protocol=1) s['key1'] = (1,2,3,4) self.assertEqual(s['key1'], (1,2,3,4)) s.close() @@ -40,12 +40,12 @@ class TestCase(unittest.TestCase): def test_in_memory_shelf(self): d1 = {} - s = shelve.Shelf(d1, binary=False) + s = shelve.Shelf(d1, protocol=0) s['key1'] = (1,2,3,4) self.assertEqual(s['key1'], (1,2,3,4)) s.close() d2 = {} - s = shelve.Shelf(d2, binary=True) + s = shelve.Shelf(d2, protocol=1) s['key1'] = (1,2,3,4) self.assertEqual(s['key1'], (1,2,3,4)) s.close() @@ -102,19 +102,19 @@ class TestShelveBase(mapping_tests.BasicTestMappingProtocol): os.unlink(f) class TestAsciiFileShelve(TestShelveBase): - _args={'binary':False} + _args={'protocol':0} _in_mem = False class TestBinaryFileShelve(TestShelveBase): - _args={'binary':True} + _args={'protocol':1} _in_mem = False class TestProto2FileShelve(TestShelveBase): _args={'protocol':2} _in_mem = False class TestAsciiMemShelve(TestShelveBase): - _args={'binary':False} + _args={'protocol':0} _in_mem = True class TestBinaryMemShelve(TestShelveBase): - _args={'binary':True} + _args={'protocol':1} _in_mem = True class TestProto2MemShelve(TestShelveBase): _args={'protocol':2} |