mirror of
https://github.com/lilydjwg/nvchecker
synced 2024-12-20 05:40:41 +00:00
23 lines
757 B
Python
23 lines
757 B
Python
# MIT licensed
|
|
# Copyright (c) 2013-2020 lilydjwg <lilydjwg@gmail.com>, et al.
|
|
|
|
import pathlib
|
|
import shutil
|
|
import pytest
|
|
pytestmark = [pytest.mark.asyncio(scope="session"),
|
|
pytest.mark.skipif(shutil.which("pacman") is None,
|
|
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("base", {
|
|
"source": "pacman",
|
|
}) == "3-2"
|
|
|
|
async def test_pacman_strip_release(get_version):
|
|
assert await get_version("base", {
|
|
"source": "pacman",
|
|
"strip_release": 1,
|
|
}) == "3"
|