nvchecker/tests/test_aur.py

32 lines
848 B
Python
Raw Normal View History

2017-02-28 07:24:53 +00:00
# MIT licensed
2020-08-17 07:11:14 +00:00
# Copyright (c) 2013-2020 lilydjwg <lilydjwg@gmail.com>, et al.
2017-02-28 07:24:53 +00:00
2019-10-15 10:59:16 +00:00
import os
2017-07-04 09:04:29 +00:00
from flaky import flaky
import pytest
2019-10-15 10:59:16 +00:00
pytestmark = [pytest.mark.asyncio,
pytest.mark.needs_net,
pytest.mark.skipif(os.environ.get('TRAVIS') == 'true',
reason="fail too often")]
2015-11-04 15:12:23 +00:00
2018-05-08 11:59:57 +00:00
@flaky(max_runs=10)
2017-07-04 09:04:29 +00:00
async def test_aur(get_version):
2020-08-17 07:11:14 +00:00
assert await get_version("ssed", {
"source": "aur",
}) == "3.62-2"
2015-11-04 15:12:23 +00:00
2018-05-08 11:59:57 +00:00
@flaky(max_runs=10)
2017-07-04 09:04:29 +00:00
async def test_aur_strip_release(get_version):
2020-08-17 07:11:14 +00:00
assert await get_version("ssed", {
"source": "aur",
"strip_release": 1,
}) == "3.62"
2018-09-25 09:23:54 +00:00
@flaky(max_runs=10)
async def test_aur_use_last_modified(get_version):
2020-08-17 07:11:14 +00:00
assert await get_version("ssed", {
"source": "aur",
'use_last_modified': True,
}) == "3.62-2-20150725052412"