Test round-trip of primitive arrays.
()
| 36 | |
| 37 | |
| 38 | def test_roundtrip_primitive_array(): |
| 39 | """Test round-trip of primitive arrays.""" |
| 40 | original = { |
| 41 | 'numbers': [1, 2, 3, 4, 5], |
| 42 | 'names': ['Alice', 'Bob', 'Charlie'], |
| 43 | 'mixed': [1, 'text', True, None] |
| 44 | } |
| 45 | |
| 46 | toon = encode(original) |
| 47 | result = decode(toon) |
| 48 | |
| 49 | assert result == original |
| 50 | |
| 51 | |
| 52 | def test_roundtrip_tabular_array(): |