Skip to content

Commit

Permalink
Skip tests depending on appstream-glib if not installed
Browse files Browse the repository at this point in the history
  • Loading branch information
carlsmedstad authored and Conan-Kudo committed Jun 6, 2021
1 parent ecd3773 commit 69bb4d2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions test/Testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ def testpath():
HAS_CHECKBASHISMS = shutil.which('checkbashisms')
HAS_DASH = shutil.which('dash')
HAS_DESKTOP_FILE_UTILS = shutil.which('desktop-file-validate')
HAS_APPSTREAM_GLIB = shutil.which('appstream-util')


def get_tested_path(path):
Expand Down
3 changes: 2 additions & 1 deletion test/test_appdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from rpmlint.checks.AppDataCheck import AppDataCheck
from rpmlint.filter import Filter

from Testing import CONFIG, get_tested_package
from Testing import CONFIG, get_tested_package, HAS_APPSTREAM_GLIB


@pytest.fixture(scope='function', autouse=True)
Expand All @@ -15,6 +15,7 @@ def appdatacheck():
return output, test


@pytest.mark.skipif(not HAS_APPSTREAM_GLIB, reason='Optional dependency appstream-glib not installed')
@pytest.mark.parametrize('package', ['binary/appdata'])
def test_appdata_fail(tmpdir, package, appdatacheck):
output, test = appdatacheck
Expand Down

0 comments on commit 69bb4d2

Please sign in to comment.