diff options
author | Éric Araujo <merwok@netwok.org> | 2011-09-03 00:48:17 +0200 |
---|---|---|
committer | Éric Araujo <merwok@netwok.org> | 2011-09-03 00:48:17 +0200 |
commit | 4778b90a1f0e8f8ca31a733177a7a210fed8b501 (patch) | |
tree | 76f9265f99d66c31534f753ac2151fc3464fd3f5 /Lib/test/test_shelve.py | |
parent | c256a757f82ef3963d137244373be69c97660fac (diff) | |
parent | 012b6d0d240ce5dc0300053f1d54b07a1a475680 (diff) | |
download | cpython-4778b90a1f0e8f8ca31a733177a7a210fed8b501.tar.gz |
Merge fix for #8286 from 3.2
Diffstat (limited to 'Lib/test/test_shelve.py')
-rw-r--r-- | Lib/test/test_shelve.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_shelve.py b/Lib/test/test_shelve.py index 3e73f52b87..13c126566d 100644 --- a/Lib/test/test_shelve.py +++ b/Lib/test/test_shelve.py @@ -2,7 +2,7 @@ import unittest import shelve import glob from test import support -from collections import MutableMapping +from collections.abc import MutableMapping from test.test_dbm import dbm_iterator def L1(s): @@ -129,8 +129,8 @@ class TestCase(unittest.TestCase): shelve.Shelf(d)[key] = [1] self.assertIn(key.encode('utf-8'), d) # but a different one can be given - shelve.Shelf(d, keyencoding='latin1')[key] = [1] - self.assertIn(key.encode('latin1'), d) + shelve.Shelf(d, keyencoding='latin-1')[key] = [1] + self.assertIn(key.encode('latin-1'), d) # with all consequences s = shelve.Shelf(d, keyencoding='ascii') self.assertRaises(UnicodeEncodeError, s.__setitem__, key, [1]) |