mirror of
https://github.com/lilydjwg/nvchecker
synced 2025-02-16 10:26:51 +00:00
port more tests
This commit is contained in:
parent
7de923c1e1
commit
61a67a4a5b
@ -13,5 +13,5 @@ async def get_version(name, conf, *, cache, **kwargs):
|
||||
if version != "dev-master"
|
||||
}
|
||||
|
||||
if len(data):
|
||||
return max(data, key=lambda version: versions[version]["time"])
|
||||
if len(versions):
|
||||
return max(versions, key=lambda version: versions[version]["time"])
|
||||
|
@ -1,8 +0,0 @@
|
||||
# MIT licensed
|
||||
# Copyright (c) 2013-2017 lilydjwg <lilydjwg@gmail.com>, et al.
|
||||
|
||||
import pytest
|
||||
pytestmark = [pytest.mark.asyncio, pytest.mark.needs_net]
|
||||
|
||||
async def test_gems(get_version):
|
||||
assert await get_version("example", {"gems": None}) == "1.0.2"
|
@ -1,8 +0,0 @@
|
||||
# MIT licensed
|
||||
# Copyright (c) 2013-2017 lilydjwg <lilydjwg@gmail.com>, et al.
|
||||
|
||||
import pytest
|
||||
pytestmark = [pytest.mark.asyncio, pytest.mark.needs_net]
|
||||
|
||||
async def test_hackage(get_version):
|
||||
assert await get_version("sessions", {"hackage": None}) == "2008.7.18"
|
@ -1,8 +0,0 @@
|
||||
# MIT licensed
|
||||
# Copyright (c) 2013-2017 lilydjwg <lilydjwg@gmail.com>, et al.
|
||||
|
||||
import pytest
|
||||
pytestmark = [pytest.mark.asyncio, pytest.mark.needs_net]
|
||||
|
||||
async def test_npm(get_version):
|
||||
assert await get_version("example", {"npm": None}) == "0.0.0"
|
@ -1,8 +1,10 @@
|
||||
# MIT licensed
|
||||
# Copyright (c) 2013-2017 lilydjwg <lilydjwg@gmail.com>, et al.
|
||||
# Copyright (c) 2013-2020 lilydjwg <lilydjwg@gmail.com>, et al.
|
||||
|
||||
import pytest
|
||||
pytestmark = [pytest.mark.asyncio, pytest.mark.needs_net]
|
||||
|
||||
async def test_cpan(get_version):
|
||||
assert await get_version("POE-Component-Server-HTTPServer", {"cpan": None}) == "0.9.2"
|
||||
assert await get_version("POE-Component-Server-HTTPServer", {
|
||||
"source": "cpan",
|
||||
}) == "0.9.2"
|
10
tests/test_gems.py
Normal file
10
tests/test_gems.py
Normal file
@ -0,0 +1,10 @@
|
||||
# MIT licensed
|
||||
# Copyright (c) 2013-2020 lilydjwg <lilydjwg@gmail.com>, et al.
|
||||
|
||||
import pytest
|
||||
pytestmark = [pytest.mark.asyncio, pytest.mark.needs_net]
|
||||
|
||||
async def test_gems(get_version):
|
||||
assert await get_version("example", {
|
||||
"source": "gems",
|
||||
}) == "1.0.2"
|
10
tests/test_hackage.py
Normal file
10
tests/test_hackage.py
Normal file
@ -0,0 +1,10 @@
|
||||
# MIT licensed
|
||||
# Copyright (c) 2013-2020 lilydjwg <lilydjwg@gmail.com>, et al.
|
||||
|
||||
import pytest
|
||||
pytestmark = [pytest.mark.asyncio, pytest.mark.needs_net]
|
||||
|
||||
async def test_hackage(get_version):
|
||||
assert await get_version("sessions", {
|
||||
"source": "hackage",
|
||||
}) == "2008.7.18"
|
10
tests/test_npm.py
Normal file
10
tests/test_npm.py
Normal file
@ -0,0 +1,10 @@
|
||||
# MIT licensed
|
||||
# Copyright (c) 2013-2020 lilydjwg <lilydjwg@gmail.com>, et al.
|
||||
|
||||
import pytest
|
||||
pytestmark = [pytest.mark.asyncio, pytest.mark.needs_net]
|
||||
|
||||
async def test_npm(get_version):
|
||||
assert await get_version("example", {
|
||||
"source": "npm",
|
||||
}) == "0.0.0"
|
@ -1,8 +1,10 @@
|
||||
# MIT licensed
|
||||
# Copyright (c) 2013-2017 lilydjwg <lilydjwg@gmail.com>, et al.
|
||||
# Copyright (c) 2013-2020 lilydjwg <lilydjwg@gmail.com>, et al.
|
||||
|
||||
import pytest
|
||||
pytestmark = [pytest.mark.asyncio, pytest.mark.needs_net]
|
||||
|
||||
async def test_packagist(get_version):
|
||||
assert await get_version("butterfly/example-web-application", {"packagist": None}) == "1.2.0"
|
||||
assert await get_version("butterfly/example-web-application", {
|
||||
"source": "packagist",
|
||||
}) == "1.2.0"
|
Loading…
Reference in New Issue
Block a user