コード例 #1
0
 def test_supports_surrogates(self):
     bytes_with_surrogates = '\ud83d\ude4f'.encode('utf-8', 'surrogatepass')
     assert str_to_bytes(u'\ud83d\ude4f') == bytes_with_surrogates
コード例 #2
0
 def test_from_unicode(self):
     assert isinstance(str_to_bytes(u'foo'), bytes)
コード例 #3
0
 def test_from_bytes(self):
     assert isinstance(str_to_bytes(b'foo'), bytes)
コード例 #4
0
ファイル: test_utils.py プロジェクト: smurfix/aio-py-amqp
 def test_from_bytes(self):
     assert isinstance(str_to_bytes(b'foo'), bytes)
コード例 #5
0
ファイル: test_utils.py プロジェクト: smurfix/aio-py-amqp
 def test_supports_surrogates(self):
     bytes_with_surrogates = '\ud83d\ude4f'.encode('utf-8', 'surrogatepass')
     assert str_to_bytes('\ud83d\ude4f') == bytes_with_surrogates
コード例 #6
0
ファイル: test_utils.py プロジェクト: smurfix/aio-py-amqp
 def test_from_unicode(self):
     assert isinstance(str_to_bytes('foo'), bytes)
コード例 #7
0
 def test_from_bytes(self):
     self.assertIsInstance(str_to_bytes(b'foo'), bytes)
コード例 #8
0
 def test_from_unicode(self):
     self.assertIsInstance(str_to_bytes('foo'), bytes)
コード例 #9
0
ファイル: test_utils.py プロジェクト: adamchainz/py-amqp
 def test_from_bytes(self):
     self.assertIsInstance(str_to_bytes(b'foo'), bytes)
コード例 #10
0
ファイル: test_utils.py プロジェクト: adamchainz/py-amqp
 def test_from_unicode(self):
     self.assertIsInstance(str_to_bytes('foo'), bytes)