Add a testcase for r47086 which fixed a bug in codec_getstreamcodec().
This commit is contained in:
parent
653f23cc81
commit
84392bee48
|
@ -6,7 +6,8 @@
|
|||
|
||||
from test import test_support
|
||||
from test import test_multibytecodec_support
|
||||
import unittest, StringIO, codecs, sys
|
||||
from test.test_support import TESTFN
|
||||
import unittest, StringIO, codecs, sys, os
|
||||
|
||||
class Test_MultibyteCodec(unittest.TestCase):
|
||||
|
||||
|
@ -25,6 +26,13 @@ class Test_MultibyteCodec(unittest.TestCase):
|
|||
self.assertRaises(IndexError, dec,
|
||||
'apple\x92ham\x93spam', 'test.cjktest')
|
||||
|
||||
def test_codingspec(self):
|
||||
print >> open(TESTFN, 'w'), '# coding: euc-kr'
|
||||
try:
|
||||
exec open(TESTFN)
|
||||
finally:
|
||||
os.unlink(TESTFN)
|
||||
|
||||
class Test_IncrementalEncoder(unittest.TestCase):
|
||||
|
||||
def test_stateless(self):
|
||||
|
|
Loading…
Reference in New Issue