diff --git a/test/mockdata/mock_icon_sizes.py b/test/mockdata/mock_icon_sizes.py new file mode 100644 index 000000000..31c37ff15 --- /dev/null +++ b/test/mockdata/mock_icon_sizes.py @@ -0,0 +1,11 @@ +from Testing import get_tested_mock_package + +ICONSIZES = get_tested_mock_package( + files={ + '/usr/share/tasque/icons/hicolor/16x16/status/tasque-note.png': { + 'metadata': { + 'magic': '22 x 22' + } + } + } +) diff --git a/test/test_icon_sizes.py b/test/test_icon_sizes.py index ad96ff853..7a0498300 100644 --- a/test/test_icon_sizes.py +++ b/test/test_icon_sizes.py @@ -1,8 +1,9 @@ +from mockdata.mock_icon_sizes import ICONSIZES import pytest from rpmlint.checks.IconSizesCheck import IconSizesCheck from rpmlint.filter import Filter -from Testing import CONFIG, get_tested_package +from Testing import CONFIG @pytest.fixture(scope='function', autouse=True) @@ -13,9 +14,9 @@ def iconsizescheck(): return output, test -@pytest.mark.parametrize('package', ['binary/tasque']) -def test_icon_sizes(tmp_path, package, iconsizescheck): +@pytest.mark.parametrize('package', [ICONSIZES]) +def test_icon_sizes(package, iconsizescheck): output, test = iconsizescheck - test.check(get_tested_package(package, tmp_path)) + test.check(package) out = output.print_results(output.results) assert 'E: wrong-icon-size /usr/share/tasque/icons/hicolor/16x16/status/tasque-note.png expected: 16x16 actual: 22x22' in out