test_plot.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:pytrip 作者: pytrip 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号