Test round-trip of simple object.
()
| 4 | |
| 5 | |
| 6 | def test_roundtrip_simple_object(): |
| 7 | """Test round-trip of simple object.""" |
| 8 | original = { |
| 9 | 'name': 'Alice', |
| 10 | 'age': 30, |
| 11 | 'active': True |
| 12 | } |
| 13 | |
| 14 | toon = encode(original) |
| 15 | result = decode(toon) |
| 16 | |
| 17 | assert result == original |
| 18 | |
| 19 | |
| 20 | def test_roundtrip_nested_object(): |