Merge pull request #188 from yan12125/fix-test-pacman

Fix test_pacman in some scenarios
This commit is contained in:
依云 2021-06-03 12:38:14 +08:00 committed by GitHub
commit 6f7633a93c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -9,4 +9,4 @@ async def test_anitya(get_version):
assert await get_version("shutter", {
"source": "anitya",
"anitya": "fedora/shutter",
}) == "0.95"
}) == "0.96"

View File

@ -1,11 +1,14 @@
# MIT licensed
# Copyright (c) 2013-2020 lilydjwg <lilydjwg@gmail.com>, et al.
import pathlib
import shutil
import pytest
pytestmark = [pytest.mark.asyncio,
pytest.mark.skipif(shutil.which("pacman") is None,
reason="requires pacman command")]
reason="requires pacman command"),
pytest.mark.skipif(not pathlib.Path("/var/lib/pacman/sync/core.db").exists(),
reason="requires synced pacman databases")]
async def test_pacman(get_version):
assert await get_version("ipw2100-fw", {