[arch-commits] Commit in nvchecker/trunk (PKGBUILD fix-tests.patch)
Date: Monday, November 4, 2019 @ 09:10:31 Author: yan12125 Revision: 523834 nvchecker: fix tests and other changes/improvements * Add VCS packages for VCS tests, as well as to optdepends * Use upstream patches for test failures * The Debian API has been fixed for a long time. Actually it's fixed in less than 24 hours after I reported it to oftc.net#debian-debsources. * pytest-httpbin is used in test_regex-2.patch Modified: nvchecker/trunk/PKGBUILD Deleted: nvchecker/trunk/fix-tests.patch -+ PKGBUILD| 20 +--- fix-tests.patch | 17 - 2 files changed, 13 insertions(+), 24 deletions(-) Modified: PKGBUILD === --- PKGBUILD2019-11-04 09:09:57 UTC (rev 523833) +++ PKGBUILD2019-11-04 09:10:31 UTC (rev 523834) @@ -9,18 +9,25 @@ url="https://github.com/lilydjwg/nvchecker; license=('MIT') depends=('python' 'python-setuptools' 'python-structlog' 'python-tornado' 'python-pycurl') -checkdepends=('python-pytest' 'python-pytest-asyncio' 'python-flaky') +checkdepends=('python-pytest' 'python-pytest-asyncio' 'python-pytest-httpbin' 'python-flaky' 'git' 'mercurial') optdepends=( 'pyalpm: allow using "sort_version_key = vercmp" in configuration files' + 'bzr: for VCS sources' + 'git: for VCS sources' + 'mercurial: for VCS sources' + 'subversion: for VCS sources' ) -source=("$pkgname-$pkgver.tar.gz::https://github.com/lilydjwg/nvchecker/archive/v$pkgver.tar.gz; -'fix-tests.patch') +source=("https://github.com/lilydjwg/nvchecker/archive/v$pkgver/$pkgname-$pkgver.tar.gz; + "$pkgname-test_regex-1.patch::https://github.com/lilydjwg/nvchecker/commit/1e1f431f9bf301ac2ac3e4f158632da8d0ac0858.patch; + "$pkgname-test_regex-2.patch::https://github.com/lilydjwg/nvchecker/commit/6f48b774ae6bffea857e97bed04dd856c7d8aa55.patch;) sha512sums=('5fb95901641953a093a8d6c10d5b72ad9982dc8cc6161e769b30a861e4057100b861dbe9ae26c288b4fa1126b261f34c82afeb0052670429c1b7f97d1b2cf6ff' - '398dd6d080bdd4d50905a32012fb33fb3d057d4e655a5a908c3ddf0f9f944a55ab5b20fd0545cb2b3e2d9ff2325c596cad8116012e6a281ca01414ead66be92e') + '1c6f42b3df56eee04aecdf09be35972aa184d82a986b942011782b65e717327757eddcc5bea690cf08ff0cf9a0f57b519c2a614f5289ac1cff98bbdf6f90175d' + '5ff70455d2234ddadd8c2a72812b3896c9ec1fa4acf8cb529a5ceaedb2f8b5ffdd9688665f9aec8ddfdc83d3d2482bc0aa9f2a468f04848decf80527ad58f858') prepare() { cd nvchecker-$pkgver - patch -Np1 -i ../fix-tests.patch + patch -Np1 -i ../$pkgname-test_regex-1.patch + patch -Np1 -i ../$pkgname-test_regex-2.patch } build() { @@ -30,8 +37,7 @@ check() { cd nvchecker-$pkgver - # Debian API appears broken - pytest -k 'not test_debianpkg' + pytest } package() { Deleted: fix-tests.patch === --- fix-tests.patch 2019-11-04 09:09:57 UTC (rev 523833) +++ fix-tests.patch 2019-11-04 09:10:31 UTC (rev 523834) @@ -1,17 +0,0 @@ -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", {
[arch-commits] Commit in nvchecker/trunk (PKGBUILD fix-tests.patch)
Date: Sunday, July 7, 2019 @ 19:07:52 Author: yan12125 Revision: 487647 upgpkg: nvchecker 1.4.4-1 Added: nvchecker/trunk/fix-tests.patch Modified: nvchecker/trunk/PKGBUILD -+ PKGBUILD| 18 +- fix-tests.patch | 17 + 2 files changed, 30 insertions(+), 5 deletions(-) Modified: PKGBUILD === --- PKGBUILD2019-07-07 18:05:46 UTC (rev 487646) +++ PKGBUILD2019-07-07 19:07:52 UTC (rev 487647) @@ -2,7 +2,7 @@ # Maintainer: Chih-Hsuan Yen pkgname=nvchecker -pkgver=1.4.3 +pkgver=1.4.4 pkgrel=1 pkgdesc="New version checker for software releases" arch=('any') @@ -9,13 +9,20 @@ 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 python setup.py build @@ -23,7 +30,8 @@ check() { cd nvchecker-$pkgver - pytest + # Debian API appears broken + pytest -k 'not test_debianpkg' } package() { Added: fix-tests.patch === --- fix-tests.patch (rev 0) +++ fix-tests.patch 2019-07-07 19:07:52 UTC (rev 487647) @@ -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", {