(self, monkeypatch)
| 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}]}} |
nothing calls this directly
no test coverage detected