mirror of
https://github.com/lilydjwg/nvchecker
synced 2025-02-25 23:11:29 +00:00
test: test github use_max_tag with paging and include_tags_pattern
This commit is contained in:
parent
23e9464cda
commit
2e4f2bc424
@ -1,7 +1,8 @@
|
|||||||
# MIT licensed
|
# MIT licensed
|
||||||
# Copyright (c) 2013-2017 lilydjwg <lilydjwg@gmail.com>, et al.
|
# Copyright (c) 2013-2018 lilydjwg <lilydjwg@gmail.com>, et al.
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
import re
|
||||||
import pytest
|
import pytest
|
||||||
pytestmark = [pytest.mark.asyncio,
|
pytestmark = [pytest.mark.asyncio,
|
||||||
pytest.mark.skipif("NVCHECKER_GITHUB_TOKEN" not in os.environ,
|
pytest.mark.skipif("NVCHECKER_GITHUB_TOKEN" not in os.environ,
|
||||||
@ -21,3 +22,11 @@ async def test_github_max_tag(get_version):
|
|||||||
|
|
||||||
async def test_github_max_tag_with_ignored_tags(get_version):
|
async def test_github_max_tag_with_ignored_tags(get_version):
|
||||||
assert await get_version("example", {"github": "harry-sanabria/ReleaseTestRepo", "use_max_tag": 1, "ignored_tags": "second_release release3"}) == "first_release"
|
assert await get_version("example", {"github": "harry-sanabria/ReleaseTestRepo", "use_max_tag": 1, "ignored_tags": "second_release release3"}) == "first_release"
|
||||||
|
|
||||||
|
async def test_github_max_tag_with_include(get_version):
|
||||||
|
version = await get_version("example", {
|
||||||
|
"github": "EFForg/https-everywhere",
|
||||||
|
"use_max_tag": 1,
|
||||||
|
"include_tags_pattern": r"^\d",
|
||||||
|
})
|
||||||
|
assert re.match(r'[\d.]+', version)
|
||||||
|
Loading…
Reference in New Issue
Block a user