[Python-checkins] r46909 - python/trunk/Lib/test/test_codecs.py

neal.norwitz python-checkins at python.org
Tue Jun 13 10:41:07 CEST 2006


Author: neal.norwitz
Date: Tue Jun 13 10:41:06 2006
New Revision: 46909
Modified:
 python/trunk/Lib/test/test_codecs.py
Log:
Verify the crash due to EncodingMap not initialized does not return
Modified: python/trunk/Lib/test/test_codecs.py
==============================================================================
--- python/trunk/Lib/test/test_codecs.py	(original)
+++ python/trunk/Lib/test/test_codecs.py	Tue Jun 13 10:41:06 2006
@@ -1166,6 +1166,12 @@
 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"


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /