def test_generate(self):
fd, outfile = tempfile.mkstemp(suffix='.png')
# convert CT cube to DICOM
pytrip.utils.rst_plot.main([self.rst_file, outfile])
# check if destination file is not empty
self.assertTrue(os.path.exists(outfile))
self.assertGreater(os.path.getsize(outfile), 0)
self.assertEqual(imghdr.what(outfile), 'png')
os.close(fd) # Windows needs it
os.remove(outfile) # we need only temp filename, not the file
评论列表
文章目录