test_list.py 321 B

123456789101112
  1. from erlpack import pack
  2. def test_list():
  3. assert pack([1, "two", 3.0, "four", ['five']]) == (
  4. '\x83l\x00\x00\x00\x05a\x01m\x00\x00\x00\x03twoF@\x08\x00\x00\x00\x00\x00\x00m\x00\x00\x00\x04fourl\x00\x00'
  5. '\x00\x01m\x00\x00\x00\x04fivejj'
  6. )
  7. def test_empty_list():
  8. assert pack([]) == '\x83j'