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

Method test_to_yaml_width

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

Source from the content-addressed store, hash-verified

260 assert data == test_dict
261
262 def test_to_yaml_width(self):
263 long_value = "a " * 80 # 160 character string
264 a = Box({"key": long_value.strip()})
265 narrow = a.to_yaml(width=40)
266 wide = a.to_yaml(width=200)
267 # With width=200, the value should fit on fewer lines than width=40
268 assert len(wide.splitlines()) < len(narrow.splitlines())
269
270 def test_dir(self):
271 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