Exemplo n.º 1
0
 def test_pkg(pkgpath):
     testdir = tempfile.mkdtemp('-test', 'pypm-')
     extracted_dir, _ = sh.unpack_archive(pkgpath, testdir)
     # check if we have read access on the directory
     for child in os.listdir(extracted_dir):
         p = path.join(extracted_dir, child)
         if path.isdir(p):
             os.listdir(p)
     sh.rm(testdir)
Exemplo n.º 2
0
def test_compression_issue_11():
    """https://github.com/ActiveState/applib/issues/#issue/11
    
    * Windows: IOError: [Errno 13] Permission denied: '.\\airi-0.0.1\\AIRi'
    * OSX: IOError: [Errno 21] Is a directory: './airi-0.0.1/AIRi
    * OSX Archive Utility (Finder): Unable to unarchive "airi-0.0.1.tar" ...
         (Error 1 - Operation not permitted.)
    """
    testdir = tempfile.mkdtemp('applib')
    d, _ = sh.unpack_archive(path.join(fixtures, 'airi-0.0.1.tar.gz'), testdir)
Exemplo n.º 3
0
def test_compression_windows_syntax_incorrect():
    """
    WindowsError: [Error 123] The filename, directory name, or volume label syntax i
    s incorrect: '.\\merengue-0.7.0\\plugins\\saml2\\attribute-maps\\urn:oasis:names
    :tc:SAML:2.0:attrname-format:uri'
    """
    testdir = tempfile.mkdtemp('-test', 'pypm-')
    with pytest.raises(sh.PackError):
        extracted_dir, _ = sh.unpack_archive(
            path.join(fixtures, 'merengue-0.7.0.tar.gz'), testdir)
Exemplo n.º 4
0
 def extract():
     testdir = tempfile.mkdtemp('-test', 'pypm-')
     extracted_dir, _ = sh.unpack_archive(
         path.join(fixtures, 'libtele-0.2.tar.gz'), testdir)