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

Method test_empty

tests/utils/test_profiling.py:42–49  ·  view source on GitHub ↗

Test that the profiler correctly produces an empty result when nothing happens in a context.

(self)

Source from the content-addressed store, hash-verified

40 self.pid = os.getpid()
41
42 def test_empty(self):
43 """Test that the profiler correctly produces an empty result when nothing happens in a context."""
44 wp = WorkflowProfiler()
45
46 with wp:
47 pass
48
49 self.assertEqual(wp.get_results(), {})
50
51 def test_profile_transforms(self):
52 """Test basic reporting when invoking a single transform directly."""

Callers

nothing calls this directly

Calls 2

get_resultsMethod · 0.95
WorkflowProfilerClass · 0.90

Tested by

no test coverage detected