diff options
author | Brett Cannon <bcannon@gmail.com> | 2007-07-26 03:07:02 (GMT) |
---|---|---|
committer | Brett Cannon <bcannon@gmail.com> | 2007-07-26 03:07:02 (GMT) |
commit | d24fffe7c67c2097aa33e04498dc6b3ae0cc17ab (patch) | |
tree | 04bbb8451a4f171782f06a9e3e20c9922363880c /Lib/test/test_anydbm.py | |
parent | 2f2fffb76689df57a93366121f30e078738c552b (diff) | |
download | cpython-d24fffe7c67c2097aa33e04498dc6b3ae0cc17ab.zip cpython-d24fffe7c67c2097aa33e04498dc6b3ae0cc17ab.tar.gz cpython-d24fffe7c67c2097aa33e04498dc6b3ae0cc17ab.tar.bz2 |
Move shelve over to BytesIO as pickle.(Pickler | Unpickler) expect binary
files, not text files.
test_shelve still fails thanks to bsddb not having been fixed.
Diffstat (limited to 'Lib/test/test_anydbm.py')
-rw-r--r-- | Lib/test/test_anydbm.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Lib/test/test_anydbm.py b/Lib/test/test_anydbm.py index f5eae42..b396d6f 100644 --- a/Lib/test/test_anydbm.py +++ b/Lib/test/test_anydbm.py @@ -21,13 +21,13 @@ def _delete_files(): pass class AnyDBMTestCase(unittest.TestCase): - _dict = {'0': b'', - 'a': b'Python:', - 'b': b'Programming', - 'c': b'the', - 'd': b'way', - 'f': b'Guido', - 'g': b'intended', + _dict = {str8('0'): b'', + str8('a'): b'Python:', + str8('b'): b'Programming', + str8('c'): b'the', + str8('d'): b'way', + str8('f'): b'Guido', + str8('g'): b'intended', } def __init__(self, *args): @@ -44,7 +44,7 @@ class AnyDBMTestCase(unittest.TestCase): def test_anydbm_modification(self): self.init_db() f = anydbm.open(_fname, 'c') - self._dict['g'] = f['g'] = b"indented" + self._dict[str8('g')] = f[str8('g')] = b"indented" self.read_helper(f) f.close() |