예제 #1
0
def test_archive_root_stat(filename):
    with resource_bytesio(filename) as f:
        with tarfile.open(fileobj=f) as tarf:
            root, _, _ = filename.partition('.')
            assert oct(tarf.getmember(root).mode) == '0o755'
예제 #2
0
파일: ruby.py 프로젝트: wkarney/pre-commit
def _extract_resource(filename: str, dest: str) -> None:
    with resource_bytesio(filename) as bio:
        with tarfile.open(fileobj=bio) as tf:
            tf.extractall(dest)
예제 #3
0
def _extract_resource(filename, dest):
    with resource_bytesio(filename) as bio:
        with tarfile.open(fileobj=bio) as tf:
            tf.extractall(dest)