summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2006-06-13 08:41:06 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2006-06-13 08:41:06 (GMT)
commit6d3d339d21aa303f3cb4df13d466a9db36656f49 (patch)
treea7dd65f51894ee2d9a376b78859cb5f0890384e3
parentde4c78a1d73ab03701c86295fd0324fae705d713 (diff)
downloadcpython-6d3d339d21aa303f3cb4df13d466a9db36656f49.zip
cpython-6d3d339d21aa303f3cb4df13d466a9db36656f49.tar.gz
cpython-6d3d339d21aa303f3cb4df13d466a9db36656f49.tar.bz2
Verify the crash due to EncodingMap not initialized does not return
-rw-r--r--Lib/test/test_codecs.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_codecs.py b/Lib/test/test_codecs.py
index 6ea49cc..8153979 100644
--- a/Lib/test/test_codecs.py
+++ b/Lib/test/test_codecs.py
@@ -1166,6 +1166,12 @@ class BasicUnicodeTest(unittest.TestCase):
encoder = codecs.getencoder(encoding)
self.assertRaises(TypeError, encoder)
+ def test_encoding_map_type_initialized(self):
+ from encodings import cp1140
+ # This used to crash, we are only verifying there's no crash.
+ table_type = type(cp1140.encoding_table)
+ self.assertEqual(table_type, table_type)
+
class BasicStrTest(unittest.TestCase):
def test_basics(self):
s = "abc123"