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

Method test_to_multiline

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

Source from the content-addressed store, hash-verified

798 bx.to_json()
799
800 def test_to_multiline(self):
801 a = BoxList([Box(a=1), Box(b=2), Box(three=5)])
802
803 a.to_json(tmp_json_file, multiline=True)
804 count = 0
805 with open(tmp_json_file) as f:
806 for line in f:
807 assert isinstance(json.loads(line), dict)
808 count += 1
809 assert count == 3
810
811 def test_from_multiline(self):
812 content = '{"a": 2}\n{"b": 3}\r\n \n'

Callers

nothing calls this directly

Calls 3

to_jsonMethod · 0.95
BoxListClass · 0.90
BoxClass · 0.90

Tested by

no test coverage detected