2020-08-18 08:22:14 +00:00
|
|
|
# MIT licensed
|
|
|
|
# Copyright (c) 2013-2020 lilydjwg <lilydjwg@gmail.com>, et al.
|
|
|
|
|
|
|
|
import pytest
|
2024-11-03 10:29:19 +00:00
|
|
|
pytestmark = [pytest.mark.asyncio,
|
2020-08-18 08:22:14 +00:00
|
|
|
pytest.mark.needs_net]
|
|
|
|
|
2024-03-09 12:21:55 +00:00
|
|
|
@pytest.mark.flaky(reruns=10)
|
2020-08-18 08:22:14 +00:00
|
|
|
async def test_gitea(get_version):
|
|
|
|
ver = await get_version("example", {
|
|
|
|
"source": "gitea",
|
|
|
|
"gitea": "gitea/tea"})
|
|
|
|
assert len(ver) == 8
|
|
|
|
assert ver.isdigit()
|
|
|
|
|
2024-03-09 12:21:55 +00:00
|
|
|
@pytest.mark.flaky(reruns=10)
|
2020-08-18 08:22:14 +00:00
|
|
|
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"
|