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

Method test_createdir

tests/utils/test_handler_logfile.py:71–80  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

69
70 @SkipIfNoModule("ignite")
71 def test_createdir(self):
72 with tempfile.TemporaryDirectory() as tempdir:
73 output_dir = os.path.join(tempdir, "new_dir")
74
75 handler = LogfileHandler(output_dir=output_dir)
76 handler.attach(self.engine)
77
78 self.engine.run(range(3))
79
80 self.assertTrue(os.path.isfile(os.path.join(output_dir, "log.txt")))
81
82
83if __name__ == "__main__":

Callers

nothing calls this directly

Calls 3

attachMethod · 0.95
LogfileHandlerClass · 0.90
runMethod · 0.45

Tested by

no test coverage detected