author | Chih-Hsuan Yen
<yan12125@archlinux.org> 2019-07-07 19:07:52 UTC |
committer | Chih-Hsuan Yen
<yan12125@archlinux.org> 2019-07-07 19:07:52 UTC |
parent | d49391c0975b9b209471619d89e99cbb1b5d3a2c |
PKGBUILD | +13 | -5 |
fix-tests.patch | +17 | -0 |
diff --git a/PKGBUILD b/PKGBUILD index 6b0212f..fba6626 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -2,19 +2,26 @@ # Maintainer: Chih-Hsuan Yen <yan12125@archlinux.org> pkgname=nvchecker -pkgver=1.4.3 +pkgver=1.4.4 pkgrel=1 pkgdesc="New version checker for software releases" arch=('any') url="https://github.com/lilydjwg/nvchecker" license=('MIT') depends=('python' 'python-setuptools' 'python-structlog' 'python-tornado' 'python-pycurl') -checkdepends=('python-pytest' 'python-pytest-xdist' 'python-pytest-asyncio' 'python-flaky') +checkdepends=('python-pytest' 'python-pytest-asyncio' 'python-flaky') optdepends=( 'pyalpm: allow using "sort_version_key = vercmp" in configuration files' ) -source=("$pkgname-$pkgver.tar.gz::https://github.com/lilydjwg/nvchecker/archive/v$pkgver.tar.gz") -sha512sums=('4a0f81d201c3bbf3ff72f72b04a08e615f38cd9e0c08488392ae8f9ce706fc5044ffe1902dbf1ea9c56908df16624d940dd0771d4a44f8aff0b894c0710cc1bb') +source=("$pkgname-$pkgver.tar.gz::https://github.com/lilydjwg/nvchecker/archive/v$pkgver.tar.gz" + 'fix-tests.patch') +sha512sums=('5fb95901641953a093a8d6c10d5b72ad9982dc8cc6161e769b30a861e4057100b861dbe9ae26c288b4fa1126b261f34c82afeb0052670429c1b7f97d1b2cf6ff' + '398dd6d080bdd4d50905a32012fb33fb3d057d4e655a5a908c3ddf0f9f944a55ab5b20fd0545cb2b3e2d9ff2325c596cad8116012e6a281ca01414ead66be92e') + +prepare() { + cd nvchecker-$pkgver + patch -Np1 -i ../fix-tests.patch +} build() { cd nvchecker-$pkgver @@ -23,7 +30,8 @@ build() { check() { cd nvchecker-$pkgver - pytest + # Debian API appears broken + pytest -k 'not test_debianpkg' } package() { diff --git a/fix-tests.patch b/fix-tests.patch new file mode 100644 index 0000000..5868c34 --- /dev/null +++ b/fix-tests.patch @@ -0,0 +1,17 @@ +diff --git a/tests/test_regex.py b/tests/test_regex.py +index d131cdd..6f40efa 100644 +--- a/tests/test_regex.py ++++ b/tests/test_regex.py +@@ -5,10 +5,10 @@ import pytest + pytestmark = pytest.mark.asyncio + + async def test_regex_httpbin_default_user_agent(get_version): +- assert await get_version("example", { ++ assert (await get_version("example", { + "url": "https://httpbin.org/get", + "regex": r'"User-Agent": "([^"]+)"', +- }) == "lilydjwg/nvchecker" ++ })).startswith("lilydjwg/nvchecker") + + async def test_regex_httpbin_user_agent(get_version): + assert await get_version("example", {