mirror of
https://github.com/lilydjwg/nvchecker
synced 2025-01-12 01:09:25 +00:00
tests: use pytest-rerunfailures instead of flaky
flaky is no longer compatible with pytest 8.0 and seems unmaintained. https://github.com/pytest-dev/pytest/issues/12066
This commit is contained in:
parent
4ec12d30fd
commit
471b66ff4c
2
.github/workflows/mypy.yaml
vendored
2
.github/workflows/mypy.yaml
vendored
@ -18,7 +18,7 @@ jobs:
|
||||
${{ runner.os }}-${{ env.cache-name }}-
|
||||
${{ runner.os }}-cache-pip-
|
||||
- name: Install deps
|
||||
run: pip3 install -U tornado pytest pytest-asyncio pytest-httpbin flaky structlog tomli platformdirs aiohttp httpx mypy awesomeversion
|
||||
run: pip3 install -U tornado pytest pytest-asyncio pytest-httpbin pytest-rerunfailures structlog tomli platformdirs aiohttp httpx mypy awesomeversion
|
||||
- name: Run mypy for --install-types
|
||||
run: PATH=$HOME/.local/bin:$PATH mypy --namespace-packages --explicit-package-bases nvchecker nvchecker_source tests
|
||||
continue-on-error: true
|
||||
|
2
.github/workflows/tests.yaml
vendored
2
.github/workflows/tests.yaml
vendored
@ -47,7 +47,7 @@ jobs:
|
||||
sudo ln -s /etc/ssl/certs/ca-certificates.crt /etc/pki/tls/certs/ca-bundle.crt
|
||||
# werkzeug is pinned for httpbin compatibility https://github.com/postmanlabs/httpbin/issues/673
|
||||
- name: Install Python deps
|
||||
run: pip install -U ${{ matrix.deps }} pytest 'pytest-asyncio>=0.23' pytest-httpbin flaky structlog tomli platformdirs lxml 'werkzeug<2.1' awesomeversion
|
||||
run: pip install -U ${{ matrix.deps }} pytest 'pytest-asyncio>=0.23' pytest-httpbin pytest-rerunfailures structlog tomli platformdirs lxml 'werkzeug<2.1' awesomeversion
|
||||
- name: Decrypt keys
|
||||
env:
|
||||
KEY: ${{ secrets.KEY }}
|
||||
|
@ -2,11 +2,10 @@
|
||||
# Copyright (c) 2020-2021 lilydjwg <lilydjwg@gmail.com>, et al.
|
||||
# Copyright (c) 2017 Felix Yan <felixonmars@archlinux.org>, et al.
|
||||
|
||||
from flaky import flaky
|
||||
import pytest
|
||||
pytestmark = [pytest.mark.asyncio(scope="session"), pytest.mark.needs_net]
|
||||
|
||||
@flaky(max_runs=10)
|
||||
@pytest.mark.flaky(reruns=10)
|
||||
async def test_apt(get_version):
|
||||
assert await get_version("sigrok-firmware-fx2lafw", {
|
||||
"source": "apt",
|
||||
@ -14,7 +13,7 @@ async def test_apt(get_version):
|
||||
"suite": "sid",
|
||||
}) == "0.1.7-1"
|
||||
|
||||
@flaky(max_runs=10)
|
||||
@pytest.mark.flaky(reruns=10)
|
||||
async def test_apt_srcpkg(get_version):
|
||||
ver = await get_version("test", {
|
||||
"source": "apt",
|
||||
@ -24,7 +23,7 @@ async def test_apt_srcpkg(get_version):
|
||||
})
|
||||
assert ver.startswith("0.0~git20150829.56e4718-")
|
||||
|
||||
@flaky(max_runs=10)
|
||||
@pytest.mark.flaky(reruns=10)
|
||||
async def test_apt_strip_release(get_version):
|
||||
assert await get_version("sigrok-firmware-fx2lafw", {
|
||||
"source": "apt",
|
||||
@ -34,7 +33,7 @@ async def test_apt_strip_release(get_version):
|
||||
}) == "0.1.7"
|
||||
|
||||
@pytest.mark.skip
|
||||
@flaky(max_runs=10)
|
||||
@pytest.mark.flaky(reruns=10)
|
||||
async def test_apt_deepin(get_version):
|
||||
assert await get_version("sigrok-firmware-fx2lafw", {
|
||||
"source": "apt",
|
||||
|
@ -1,31 +1,30 @@
|
||||
# MIT licensed
|
||||
# Copyright (c) 2013-2020 lilydjwg <lilydjwg@gmail.com>, et al.
|
||||
|
||||
from flaky import flaky
|
||||
import pytest
|
||||
pytestmark = [pytest.mark.asyncio(scope="session"), pytest.mark.needs_net]
|
||||
|
||||
@flaky
|
||||
@pytest.mark.flaky
|
||||
async def test_archpkg(get_version):
|
||||
assert await get_version("base", {
|
||||
"source": "archpkg",
|
||||
}) == "3-2"
|
||||
|
||||
@flaky
|
||||
@pytest.mark.flaky
|
||||
async def test_archpkg_strip_release(get_version):
|
||||
assert await get_version("base", {
|
||||
"source": "archpkg",
|
||||
"strip_release": True,
|
||||
}) == "3"
|
||||
|
||||
@flaky
|
||||
@pytest.mark.flaky
|
||||
async def test_archpkg_provided(get_version):
|
||||
assert await get_version("dbus", {
|
||||
"source": "archpkg",
|
||||
"provided": "libdbus-1.so",
|
||||
}) == "3-64"
|
||||
|
||||
@flaky
|
||||
@pytest.mark.flaky
|
||||
async def test_archpkg_provided_strip(get_version):
|
||||
assert await get_version("jsoncpp", {
|
||||
"source": "archpkg",
|
||||
|
@ -3,27 +3,26 @@
|
||||
|
||||
import os
|
||||
|
||||
from flaky import flaky
|
||||
import pytest
|
||||
pytestmark = [pytest.mark.asyncio(scope="session"),
|
||||
pytest.mark.needs_net,
|
||||
pytest.mark.skipif(os.environ.get('TRAVIS') == 'true',
|
||||
reason="fail too often")]
|
||||
|
||||
@flaky(max_runs=10)
|
||||
@pytest.mark.flaky(reruns=10)
|
||||
async def test_aur(get_version):
|
||||
assert await get_version("ssed", {
|
||||
"source": "aur",
|
||||
}) == "3.62-2"
|
||||
|
||||
@flaky(max_runs=10)
|
||||
@pytest.mark.flaky(reruns=10)
|
||||
async def test_aur_strip_release(get_version):
|
||||
assert await get_version("ssed", {
|
||||
"source": "aur",
|
||||
"strip_release": 1,
|
||||
}) == "3.62"
|
||||
|
||||
@flaky(max_runs=10)
|
||||
@pytest.mark.flaky(reruns=10)
|
||||
async def test_aur_use_last_modified(get_version):
|
||||
assert await get_version("ssed", {
|
||||
"source": "aur",
|
||||
|
@ -2,24 +2,23 @@
|
||||
# Copyright (c) 2020 lilydjwg <lilydjwg@gmail.com>, et al.
|
||||
# Copyright (c) 2017 Felix Yan <felixonmars@archlinux.org>, et al.
|
||||
|
||||
from flaky import flaky
|
||||
import pytest
|
||||
pytestmark = [pytest.mark.asyncio(scope="session"), pytest.mark.needs_net]
|
||||
|
||||
@flaky(max_runs=10)
|
||||
@pytest.mark.flaky(reruns=10)
|
||||
async def test_debianpkg(get_version):
|
||||
assert await get_version("sigrok-firmware-fx2lafw", {
|
||||
"source": "debianpkg",
|
||||
}) == "0.1.7-1"
|
||||
|
||||
@flaky(max_runs=10)
|
||||
@pytest.mark.flaky(reruns=10)
|
||||
async def test_debianpkg_strip_release(get_version):
|
||||
assert await get_version("sigrok-firmware-fx2lafw", {
|
||||
"source": "debianpkg",
|
||||
"strip_release": 1,
|
||||
}) == "0.1.7"
|
||||
|
||||
@flaky(max_runs=10)
|
||||
@pytest.mark.flaky(reruns=10)
|
||||
async def test_debianpkg_suite(get_version):
|
||||
assert await get_version("sigrok-firmware-fx2lafw", {
|
||||
"source": "debianpkg",
|
||||
|
@ -1,12 +1,11 @@
|
||||
# MIT licensed
|
||||
# Copyright (c) 2013-2020 lilydjwg <lilydjwg@gmail.com>, et al.
|
||||
|
||||
from flaky import flaky
|
||||
import pytest
|
||||
pytestmark = [pytest.mark.asyncio(scope="session"),
|
||||
pytest.mark.needs_net]
|
||||
|
||||
@flaky(max_runs=10)
|
||||
@pytest.mark.flaky(reruns=10)
|
||||
async def test_gitea(get_version):
|
||||
ver = await get_version("example", {
|
||||
"source": "gitea",
|
||||
@ -14,7 +13,7 @@ async def test_gitea(get_version):
|
||||
assert len(ver) == 8
|
||||
assert ver.isdigit()
|
||||
|
||||
@flaky(max_runs=10)
|
||||
@pytest.mark.flaky(reruns=10)
|
||||
async def test_gitea_max_tag_with_include(get_version):
|
||||
assert await get_version("example", {
|
||||
"source": "gitea",
|
||||
|
@ -1,11 +1,10 @@
|
||||
# MIT licensed
|
||||
# Copyright (c) 2013-2020 lilydjwg <lilydjwg@gmail.com>, et al.
|
||||
|
||||
from flaky import flaky
|
||||
import pytest
|
||||
pytestmark = [pytest.mark.asyncio(scope="session"), pytest.mark.needs_net]
|
||||
|
||||
@flaky(max_runs=10)
|
||||
@pytest.mark.flaky(reruns=10)
|
||||
async def test_hackage(get_version):
|
||||
assert await get_version("sessions", {
|
||||
"source": "hackage",
|
||||
|
@ -1,19 +1,18 @@
|
||||
# MIT licensed
|
||||
# Copyright (c) 2019-2020 lilydjwg <lilydjwg@gmail.com>, et al.
|
||||
|
||||
from flaky import flaky
|
||||
import pytest
|
||||
pytestmark = [pytest.mark.asyncio(scope="session"),
|
||||
pytest.mark.needs_net]
|
||||
|
||||
@flaky(max_runs=10)
|
||||
@pytest.mark.flaky(reruns=10)
|
||||
async def test_repology(get_version):
|
||||
assert await get_version("ssed", {
|
||||
"source": "repology",
|
||||
"repo": "aur",
|
||||
}) == "3.62"
|
||||
|
||||
@flaky(max_runs=10)
|
||||
@pytest.mark.flaky(reruns=10)
|
||||
async def test_repology_subrepo(get_version):
|
||||
assert await get_version("asciiquarium", {
|
||||
"source": "repology",
|
||||
|
@ -2,31 +2,30 @@
|
||||
# Copyright (c) 2020 lilydjwg <lilydjwg@gmail.com>, et al.
|
||||
# Copyright (c) 2017 Felix Yan <felixonmars@archlinux.org>, et al.
|
||||
|
||||
from flaky import flaky
|
||||
import pytest
|
||||
pytestmark = [pytest.mark.asyncio(scope="session"), pytest.mark.needs_net]
|
||||
|
||||
@flaky
|
||||
@pytest.mark.flaky
|
||||
async def test_ubuntupkg(get_version):
|
||||
assert await get_version("sigrok-firmware-fx2lafw", {
|
||||
"source": "ubuntupkg",
|
||||
}) == "0.1.7-1"
|
||||
|
||||
@flaky
|
||||
@pytest.mark.flaky
|
||||
async def test_ubuntupkg_strip_release(get_version):
|
||||
assert await get_version("sigrok-firmware-fx2lafw", {
|
||||
"source": "ubuntupkg",
|
||||
"strip_release": True,
|
||||
}) == "0.1.7"
|
||||
|
||||
@flaky
|
||||
@pytest.mark.flaky
|
||||
async def test_ubuntupkg_suite(get_version):
|
||||
assert await get_version("sigrok-firmware-fx2lafw", {
|
||||
"source": "ubuntupkg",
|
||||
"suite": "xenial",
|
||||
}) == "0.1.2-1"
|
||||
|
||||
@flaky
|
||||
@pytest.mark.flaky
|
||||
async def test_ubuntupkg_suite_with_paging(get_version):
|
||||
assert await get_version("ffmpeg", {
|
||||
"source": "ubuntupkg",
|
||||
|
Loading…
Reference in New Issue
Block a user