Test round-trip of empty structures.
()
| 66 | |
| 67 | |
| 68 | def test_roundtrip_empty_structures(): |
| 69 | """Test round-trip of empty structures.""" |
| 70 | original = { |
| 71 | 'empty_object': {}, |
| 72 | 'empty_array': [], |
| 73 | 'nested': { |
| 74 | 'also_empty': {} |
| 75 | } |
| 76 | } |
| 77 | |
| 78 | toon = encode(original) |
| 79 | result = decode(toon) |
| 80 | |
| 81 | assert result == original |
| 82 | |
| 83 | |
| 84 | def test_roundtrip_special_strings(): |