Skip to content

Commit

Permalink
fix test_rpkgs due to nvchecker update
Browse files Browse the repository at this point in the history
  • Loading branch information
lilydjwg committed Apr 22, 2024
1 parent dd15e22 commit 2a20d70
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/test_rpkgs.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
pytestmark = pytest.mark.asyncio(scope='session')

from nvchecker import core, __main__ as main
from nvchecker.util import Entries, VersData, RawResult
from nvchecker.util import Entries, RichResult, RawResult

async def run(entries: Entries) -> VersData:
async def run(entries: Entries) -> RichResult:
task_sem = asyncio.Semaphore(20)
result_q: asyncio.Queue[RawResult] = asyncio.Queue()
keymanager = core.KeyManager(None)
Expand All @@ -20,7 +20,7 @@ async def run(entries: Entries) -> VersData:
keymanager, entry_waiter, 1, {},
)

oldvers: VersData = {}
oldvers: RichResult = {}
result_coro = core.process_result(oldvers, result_q, entry_waiter)
runner_coro = core.run_tasks(futures)

Expand All @@ -32,7 +32,8 @@ async def get_version():
async def __call__(name, config):
entries = {name: config}
newvers = await run(entries)
return newvers.get(name)
if r := newvers.get(name):
return r.version

return __call__

Expand Down

0 comments on commit 2a20d70

Please sign in to comment.