[Python-checkins] python/dist/src/Lib/test test_shelve.py,1.8,1.9
rhettinger at users.sourceforge.net
rhettinger at users.sourceforge.net
Sun Dec 5 04:58:20 CET 2004
Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31910/Lib/test
Modified Files:
test_shelve.py
Log Message:
Removed deprecated method arguments from the shelve module.
Index: test_shelve.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_shelve.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- test_shelve.py 2 Jun 2004 18:42:25 -0000 1.8
+++ test_shelve.py 5 Dec 2004 03:58:17 -0000 1.9
@@ -10,7 +10,7 @@
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 @@
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 @@
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 @@
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}
More information about the Python-checkins
mailing list