MCPcopy Create free account
hub / github.com/Project-MONAI/MONAI / test_summary_operations

Method test_summary_operations

tests/apps/test_auto3dseg.py:267–277  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

265 assert "sum" in test_ret_np
266
267 def test_summary_operations(self):
268 op = SummaryOperations()
269 test_dict = {"min": [0, 1, 2, 3], "max": [2, 3, 4, 5], "mean": [1, 2, 3, 4], "sum": [2, 4, 6, 8]}
270 test_ret = op.evaluate(test_dict)
271 assert isinstance(test_ret["max"], Number)
272 assert isinstance(test_ret["min"], Number)
273
274 op.update({"sum": np.sum})
275 test_ret = op.evaluate(test_dict)
276 assert "sum" in test_ret
277 assert isinstance(test_ret["sum"], Number)
278
279 def test_basic_analyzer_class(self):
280 test_data = {}

Callers

nothing calls this directly

Calls 3

evaluateMethod · 0.95
SummaryOperationsClass · 0.90
updateMethod · 0.45

Tested by

no test coverage detected