MCPcopy Index your code
hub / github.com/Project-MONAI/MONAI / test_str

Method test_str

tests/bundle/test_bundle_utils.py:137–145  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

135
136class TestPPrintEdges(unittest.TestCase):
137 def test_str(self):
138 self.assertEqual(pprint_edges("", 0), "''")
139 self.assertEqual(pprint_edges({"a": 1, "b": 2}, 0), "{'a': 1, 'b': 2}")
140 self.assertEqual(
141 pprint_edges([{"a": 1, "b": 2}] * 20, 1),
142 "[{'a': 1, 'b': 2},\n\n ... omitted 18 line(s)\n\n {'a': 1, 'b': 2}]",
143 )
144 self.assertEqual(pprint_edges([{"a": 1, "b": 2}] * 8, 4), pprint_edges([{"a": 1, "b": 2}] * 8, 3))
145 self.assertEqual(update_kwargs({"a": 1}, a=2, b=3), {"a": 2, "b": 3})
146
147
148if __name__ == "__main__":

Callers

nothing calls this directly

Calls 2

pprint_edgesFunction · 0.90
update_kwargsFunction · 0.90

Tested by

no test coverage detected