2020-09-16 09:20:17 +00:00
|
|
|
# MIT licensed
|
2021-11-06 02:57:41 +00:00
|
|
|
# Copyright (c) 2020-2021 lilydjwg <lilydjwg@gmail.com>, et al.
|
2020-09-16 09:20:17 +00:00
|
|
|
# Copyright (c) 2017 Felix Yan <felixonmars@archlinux.org>, et al.
|
|
|
|
|
|
|
|
import pytest
|
2023-12-09 11:17:31 +00:00
|
|
|
pytestmark = [pytest.mark.asyncio(scope="session"), pytest.mark.needs_net]
|
2020-09-16 09:20:17 +00:00
|
|
|
|
2024-03-09 12:21:55 +00:00
|
|
|
@pytest.mark.flaky(reruns=10)
|
2020-09-16 09:20:17 +00:00
|
|
|
async def test_apt(get_version):
|
|
|
|
assert await get_version("sigrok-firmware-fx2lafw", {
|
|
|
|
"source": "apt",
|
2020-09-17 04:53:03 +00:00
|
|
|
"mirror": "http://deb.debian.org/debian/",
|
|
|
|
"suite": "sid",
|
2020-09-16 09:20:17 +00:00
|
|
|
}) == "0.1.7-1"
|
|
|
|
|
2024-03-09 12:21:55 +00:00
|
|
|
@pytest.mark.flaky(reruns=10)
|
2020-09-17 04:55:30 +00:00
|
|
|
async def test_apt_srcpkg(get_version):
|
2021-11-06 02:57:41 +00:00
|
|
|
ver = await get_version("test", {
|
2020-09-16 10:57:50 +00:00
|
|
|
"source": "apt",
|
2020-09-17 04:55:30 +00:00
|
|
|
"srcpkg": "golang-github-dataence-porter2",
|
2020-09-17 04:53:03 +00:00
|
|
|
"mirror": "http://deb.debian.org/debian/",
|
|
|
|
"suite": "sid",
|
2021-11-06 02:57:41 +00:00
|
|
|
})
|
|
|
|
assert ver.startswith("0.0~git20150829.56e4718-")
|
2020-09-16 10:57:50 +00:00
|
|
|
|
2024-03-09 12:21:55 +00:00
|
|
|
@pytest.mark.flaky(reruns=10)
|
2020-09-16 09:20:17 +00:00
|
|
|
async def test_apt_strip_release(get_version):
|
|
|
|
assert await get_version("sigrok-firmware-fx2lafw", {
|
|
|
|
"source": "apt",
|
2020-09-17 04:53:03 +00:00
|
|
|
"mirror": "http://deb.debian.org/debian/",
|
|
|
|
"suite": "sid",
|
2020-09-16 09:20:17 +00:00
|
|
|
"strip_release": 1,
|
|
|
|
}) == "0.1.7"
|
|
|
|
|
2023-08-26 02:23:40 +00:00
|
|
|
@pytest.mark.skip
|
2024-03-09 12:21:55 +00:00
|
|
|
@pytest.mark.flaky(reruns=10)
|
2020-09-16 09:20:17 +00:00
|
|
|
async def test_apt_deepin(get_version):
|
|
|
|
assert await get_version("sigrok-firmware-fx2lafw", {
|
|
|
|
"source": "apt",
|
|
|
|
"mirror": "https://community-packages.deepin.com/deepin",
|
|
|
|
"suite": "apricot",
|
|
|
|
}) == "0.1.6-1"
|
2021-06-25 07:22:40 +00:00
|
|
|
|