MCPcopy Create free account
hub / github.com/cdgriffith/Box / test_data_is_unaffected

Method test_data_is_unaffected

test/test_comments.py:52–58  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

50 assert bx.get_comment("last") is None
51
52 def test_data_is_unaffected(self):
53 bx = Box.from_yaml(DOCUMENT)
54 plain = {"name": "box", "server": {"host": "localhost", "port": 8080}, "items": ["a", "b"], "last": 1}
55 assert bx.to_dict() == plain
56 assert json.loads(bx.to_json()) == plain
57 assert bx == plain
58 assert Box.from_yaml(DOCUMENT) == Box(plain)
59
60 def test_edits_keep_comments_on_their_keys(self):
61 bx = Box.from_yaml(DOCUMENT)

Callers

nothing calls this directly

Calls 4

BoxClass · 0.90
to_dictMethod · 0.80
from_yamlMethod · 0.45
to_jsonMethod · 0.45

Tested by

no test coverage detected