示例#1
0
 def test_support_surrogates(self):
     assert bytes_to_str(u'\ud83d\ude4f') == u'\ud83d\ude4f'
示例#2
0
 def test_from_unicode(self):
     assert isinstance(bytes_to_str(u'foo'), text_t)
示例#3
0
 def test_from_bytes(self):
     assert bytes_to_str(b'foo')
示例#4
0
 def test_from_bytes(self):
     assert bytes_to_str(b'foo')
示例#5
0
 def test_support_surrogates(self):
     assert bytes_to_str(u'\ud83d\ude4f') == u'\ud83d\ude4f'
示例#6
0
 def test_from_unicode(self):
     assert isinstance(bytes_to_str(u'foo'), text_t)
示例#7
0
 def test_from_unicode(self):
     assert isinstance(bytes_to_str('foo'), str)
示例#8
0
 def test_from_bytes(self):
     self.assertTrue(bytes_to_str(b'foo'))
示例#9
0
 def test_from_unicode(self):
     self.assertIsInstance(bytes_to_str('foo'), text_t)
示例#10
0
 def test_from_bytes(self):
     self.assertTrue(bytes_to_str(b'foo'))
示例#11
0
 def test_from_unicode(self):
     self.assertIsInstance(bytes_to_str('foo'), text_t)
示例#12
0
 def test_from_unicode(self):
     assert isinstance(bytes_to_str('foo'), str)