From 805158e4480f9b232043909be0d5db45ac6e8d33 Mon Sep 17 00:00:00 2001 From: lilydjwg Date: Tue, 24 Dec 2024 21:57:40 +0800 Subject: [PATCH] fix tests --- pytest.ini | 2 ++ tests/test_rpkgs.py | 8 +++++--- 2 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 pytest.ini diff --git a/pytest.ini b/pytest.ini new file mode 100644 index 0000000..e418768 --- /dev/null +++ b/pytest.ini @@ -0,0 +1,2 @@ +[pytest] +asyncio_default_fixture_loop_scope = "session" diff --git a/tests/test_rpkgs.py b/tests/test_rpkgs.py index 78a228c..7a352d7 100644 --- a/tests/test_rpkgs.py +++ b/tests/test_rpkgs.py @@ -3,7 +3,7 @@ import pytest import pytest_asyncio -pytestmark = pytest.mark.asyncio(scope='session') +pytestmark = pytest.mark.asyncio from nvchecker import core, __main__ as main from nvchecker.util import Entries, RichResult, RawResult @@ -68,9 +68,11 @@ async def test_bioc_data_experiment(get_version): }) == '1.48.0' async def test_bioc_workflows(get_version): - assert await get_version('liftOver', { + ver = await get_version('liftOver', { 'source': 'rpkgs', 'pkgname': 'liftOver', 'repo': 'bioc-workflows', 'md5': True, - }) == '1.29.0#b19122c7d727499558484af2ce91df5e' + }) + assert ver.startswith('1.') + assert '#' in ver