test_hobeta.py 文件源码

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

项目:zxtools 作者: codeatcpp 项目源码 文件源码
def test_strip_header3(self):
        test_input_file = io.BytesIO(b"\x46\x2E\x6C\x6F\x61\x64\x2E\x41"
                                     b"\x43\x00\x80\x0A\x00\x00\x07\xB5"
                                     b"\x50\x00\x00\x3B\x20\x4C\x4F\x41"
                                     b"\x44\x45\x52\x20\x66\x6F\x72\x20")
        temp_output_path, bytes_count = self.strip_header(
            test_input_file, False)

        temp_output_file = open(temp_output_path, "rb")
        temp_output_file.seek(0, os.SEEK_END)
        try:
            self.assertEqual(temp_output_file.tell(), 10)
            self.assertEqual(bytes_count, 10)
        finally:
            temp_output_file.close()
            os.remove(temp_output_path)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号