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

Method test_filename

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

Source from the content-addressed store, hash-verified

57
58 @SkipIfNoModule("ignite")
59 def test_filename(self):
60 filename = "something_else.txt"
61
62 with tempfile.TemporaryDirectory() as tempdir:
63 handler = LogfileHandler(output_dir=tempdir, filename=filename)
64 handler.attach(self.engine)
65
66 self.engine.run(range(3))
67
68 self.assertTrue(os.path.isfile(os.path.join(tempdir, filename)))
69
70 @SkipIfNoModule("ignite")
71 def test_createdir(self):

Callers

nothing calls this directly

Calls 3

attachMethod · 0.95
LogfileHandlerClass · 0.90
runMethod · 0.45

Tested by

no test coverage detected