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'
评论列表
文章目录