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

Method test_to_yaml_width

test/test_box.py:311–317  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

309 assert data == test_dict
310
311 def test_to_yaml_width(self):
312 long_value = "a " * 80 # 160 character string
313 a = Box({"key": long_value.strip()})
314 narrow = a.to_yaml(width=40)
315 wide = a.to_yaml(width=200)
316 # With width=200, the value should fit on fewer lines than width=40
317 assert len(wide.splitlines()) < len(narrow.splitlines())
318
319 def test_dir(self):
320 a = Box(test_dict, camel_killer_box=True)

Callers

nothing calls this directly

Calls 2

to_yamlMethod · 0.95
BoxClass · 0.90

Tested by

no test coverage detected