nvchecker/tests/test_gitea.py
lilydjwg 4d5e29f26b gitea: use the full date string as commit version
Only using the date part is too coarse. Also date could be different
across timezones and thus confusing.
2024-12-28 21:53:10 +08:00

23 lines
656 B
Python

# MIT licensed
# Copyright (c) 2013-2020 lilydjwg <lilydjwg@gmail.com>, et al.
import pytest
pytestmark = [pytest.mark.asyncio,
pytest.mark.needs_net]
@pytest.mark.flaky(reruns=10)
async def test_gitea(get_version):
ver = await get_version("example", {
"source": "gitea",
"gitea": "gitea/tea"})
assert ver.startswith('20')
assert 'T' in ver
@pytest.mark.flaky(reruns=10)
async def test_gitea_max_tag_with_include(get_version):
assert await get_version("example", {
"source": "gitea",
"gitea": "gitea/tea",
"use_max_tag": True,
"include_regex": r'v0\.3.*',
}) == "v0.3.1"