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

Method test_pyyaml

test/test_comments.py:321–328  ·  view source on GitHub ↗
(self, monkeypatch)

Source from the content-addressed store, hash-verified

319 assert bx.get_comment(None) is None and bx.get_comment("name") is None
320
321 def test_pyyaml(self, monkeypatch):
322 if not converters.pyyaml_available:
323 pytest.skip("PyYAML is not installed")
324 monkeypatch.setattr(converters, "ruamel_available", False)
325 bx = Box.from_yaml(DOCUMENT)
326 assert bx.get_comment("name") is None
327 bx.set_comment("name", "ignored by PyYAML")
328 assert "#" not in bx.to_yaml()
329
330 def test_output_without_comments_is_unchanged(self):
331 data = {"z": 1, "a": {"b": [1, {"c": 2}]}}

Callers

nothing calls this directly

Calls 4

from_yamlMethod · 0.45
get_commentMethod · 0.45
set_commentMethod · 0.45
to_yamlMethod · 0.45

Tested by

no test coverage detected