summaryrefslogtreecommitdiff
path: root/Lib/test/test_shelve.py
diff options
context:
space:
mode:
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
commit4778b90a1f0e8f8ca31a733177a7a210fed8b501 (patch)
tree76f9265f99d66c31534f753ac2151fc3464fd3f5 /Lib/test/test_shelve.py
parentc256a757f82ef3963d137244373be69c97660fac (diff)
parent012b6d0d240ce5dc0300053f1d54b07a1a475680 (diff)
downloadcpython-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.py6
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])