test_unicode.py 283 B

12345678910111213
  1. from erlpack import pack
  2. def test_unicode():
  3. atm = u'hello world'
  4. assert pack(atm) == '\x83m\x00\x00\x00\x0bhello world'
  5. def test_unicode_with_actual_unicode_chars():
  6. atm = u'hello world\u202e'
  7. assert pack(atm) == '\x83m\x00\x00\x00\x0ehello world\xe2\x80\xae'