コード例 #1
0
ファイル: codecs_test.py プロジェクト: mdavid/dlr
def test_utf_7_decode():
    '''
    '''
    #sanity
    new_str, size = codecs.utf_7_decode("abc")
    AreEqual(new_str, u'abc')
    AreEqual(size, 3)
コード例 #2
0
def test_utf_7_decode():
    '''
    '''
    #sanity
    new_str, size = codecs.utf_7_decode("abc")
    AreEqual(new_str, u'abc')
    AreEqual(size, 3)
コード例 #3
0
ファイル: test_codecs.py プロジェクト: pointworld/pypy
 def test_decode_bytearray(self):
     import _codecs
     b = bytearray()
     assert _codecs.ascii_decode(b) == (u'', 0)
     assert _codecs.latin_1_decode(b) == (u'', 0)
     assert _codecs.utf_7_decode(b) == (u'', 0)
     assert _codecs.utf_8_decode(b) == (u'', 0)
     assert _codecs.utf_16_be_decode(b) == (u'', 0)
     assert _codecs.utf_16_decode(b) == (u'', 0)
     assert _codecs.utf_16_le_decode(b) == (u'', 0)
     assert _codecs.utf_16_ex_decode(b) == (u'', 0, 0)
     assert _codecs.utf_32_decode(b) == (u'', 0)
     assert _codecs.utf_32_be_decode(b) == (u'', 0)
     assert _codecs.utf_32_le_decode(b) == (u'', 0)
     assert _codecs.utf_32_ex_decode(b) == (u'', 0, 0)
     assert _codecs.charmap_decode(b) == (u'', 0)
     assert _codecs.unicode_escape_decode(b) == (u'', 0)
     assert _codecs.raw_unicode_escape_decode(b) == (u'', 0)
     assert _codecs.unicode_internal_decode(b) == (u'', 0)
コード例 #4
0
ファイル: test_codecs.py プロジェクト: Qointum/pypy
 def test_decode_bytearray(self):
     import _codecs
     b = bytearray()
     assert _codecs.ascii_decode(b) == (u'', 0)
     assert _codecs.latin_1_decode(b) == (u'', 0)
     assert _codecs.utf_7_decode(b) == (u'', 0)
     assert _codecs.utf_8_decode(b) == (u'', 0)
     assert _codecs.utf_16_be_decode(b) == (u'', 0)
     assert _codecs.utf_16_decode(b) == (u'', 0)
     assert _codecs.utf_16_le_decode(b) == (u'', 0)
     assert _codecs.utf_16_ex_decode(b) == (u'', 0, 0)
     assert _codecs.utf_32_decode(b) == (u'', 0)
     assert _codecs.utf_32_be_decode(b) == (u'', 0)
     assert _codecs.utf_32_le_decode(b) == (u'', 0)
     assert _codecs.utf_32_ex_decode(b) == (u'', 0, 0)
     assert _codecs.charmap_decode(b) == (u'', 0)
     assert _codecs.unicode_escape_decode(b) == (u'', 0)
     assert _codecs.raw_unicode_escape_decode(b) == (u'', 0)
     assert _codecs.unicode_internal_decode(b) == (u'', 0)