(self)
| 408 | assert bx.to_dict() == {"a": {"b": {"c": 1}}} |
| 409 | |
| 410 | def test_self_reference(self): |
| 411 | bx = Box(a=1) |
| 412 | dict.__setitem__(bx, "me", bx) # Box itself never builds cycles, guard against them anyway |
| 413 | assert bx.to_yaml() == "&id001\na: 1\nme: *id001\n" |
| 414 | bx.set_comment("a", "x") |
| 415 | assert "a: 1 # x" in bx.to_yaml() |
| 416 | |
| 417 | |
| 418 | class TestCommentTextIsNeverYaml: |
nothing calls this directly
no test coverage detected