Check that we can serialize modules out and deserialize them to the same thing.
(irs: dict[str, ModuleIR])
| 95 | |
| 96 | |
| 97 | def check_serialization_roundtrip(irs: dict[str, ModuleIR]) -> None: |
| 98 | """Check that we can serialize modules out and deserialize them to the same thing.""" |
| 99 | serialized = {k: ir.serialize() for k, ir in irs.items()} |
| 100 | |
| 101 | ctx = DeserMaps({}, {}) |
| 102 | irs2 = deserialize_modules(serialized, ctx) |
| 103 | assert irs.keys() == irs2.keys() |
| 104 | |
| 105 | for k in irs: |
| 106 | assert_modules_same(irs[k], irs2[k]) |
no test coverage detected
searching dependent graphs…