Codec7Zip_Test.py 文件源码

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

项目:newsreap 作者: caronc 项目源码 文件源码
def test_7z_detection(self):
        """
        Tests the 7z file detection process
        """
        from newsreap.codecs.Codec7Zip import SEVEN_ZIP_PART_RE

        result = SEVEN_ZIP_PART_RE.match('/path/to/test.7z')
        assert result is not None
        assert result.group('part') is None

        result = SEVEN_ZIP_PART_RE.match('/path/to/test.7Z')
        assert result is not None
        assert result.group('part') is None

        result = SEVEN_ZIP_PART_RE.match('/path/to/test.7z.001')
        assert result is not None
        assert result.group('part0') == '001'

        result = SEVEN_ZIP_PART_RE.match('/path/to/test.part65.7z')
        assert result is not None
        assert result.group('part') == '65'
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号