Skip to content

Commit

Permalink
TST: archive: Skip tests that depend on p7zip
Browse files Browse the repository at this point in the history
All of the checks of the test generator fail on a system without
p7zip.  Before dataladgh-4041 (in particular, before beb5d04), the subset
of checks that existed at that time was skipped with (see dataladgh-3176):

    SKIP: cmd:7z is missing. (Not) Funny enough but ATM we need p7zip
    installation to handle .gz files extraction 'correctly'

However, with the change to the archive file name in 05e9353 (TST:
Expand test coverage to additional relevant compression formats,
2020-01-17), the MissingExternalDependency exception that led to the
skip for gzip formats is no longer triggered.  And even if it were,
the other file formats tested would fail.

Mark these tests as known failures when p7zip isn't available.
  • Loading branch information
kyleam committed May 11, 2020
1 parent 5e10bbb commit 3c86d37
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions datalad/tests/test_archives.py
Expand Up @@ -22,6 +22,7 @@
ok_generator,
OBSCURE_FILENAME,
SkipTest,
skip_if,
)

from datalad.dochelpers import exc_str
Expand All @@ -33,6 +34,7 @@
)
from datalad.support.archive_utils_patool import unixify_path
from datalad.support.exceptions import MissingExternalDependency
from datalad.support.external_versions import external_versions
from datalad.support import path as op


Expand Down Expand Up @@ -131,6 +133,8 @@ def test_compress_dir():
_filename = 'fi le.dat'


@skip_if("cmd:7z" not in external_versions,
msg="Known to fail if p7zip is not installed")
@with_tree(((_filename, 'content'),))
@with_tempfile()
def check_compress_file(ext, annex, path, name):
Expand Down

0 comments on commit 3c86d37

Please sign in to comment.