(cls, options, round_trip)
| 591 | @pytest.mark.parametrize("options", BOX_OPTIONS) |
| 592 | @pytest.mark.parametrize("round_trip", ROUND_TRIPS) |
| 593 | def test_box_round_trip(cls, options, round_trip): |
| 594 | b = _annotated_box(cls, options) |
| 595 | out = round_trip(b) |
| 596 | assert out is not b |
| 597 | assert _box_state(out) == _box_state(b) |
| 598 | if options.get("frozen_box"): |
| 599 | with pytest.raises(BoxError): |
| 600 | out.Top = 5 |
| 601 | with pytest.raises(BoxError): |
| 602 | out.sub.k = 5 |
| 603 | else: |
| 604 | out.set_comment("Top", "changed") |
| 605 | assert b.get_comment("Top") == {"before": "top-c"} |
| 606 | if options.get("box_dots"): |
| 607 | assert out["lst[0].i"] == 0 |
| 608 | assert out.get_comment("lst[1]") == {"eol": "l1-c"} |
| 609 | |
| 610 | |
| 611 | @pytest.mark.parametrize("round_trip", ROUND_TRIPS[:2] + ROUND_TRIPS[3:]) |
nothing calls this directly
no test coverage detected