testing/castero: rebuild against python 3.12, switch to gpep517

This commit is contained in:
mio 2024-07-25 17:36:11 +00:00 committed by Celeste
parent 712a331b75
commit c2a15234e9
2 changed files with 32 additions and 8 deletions

View File

@ -2,11 +2,10 @@
# Maintainer: Dmitry Zakharchenko <dmitz@disroot.org>
pkgname=castero
pkgver=0.9.5
pkgrel=2
pkgrel=3
pkgdesc="TUI podcast client for the terminal"
url="https://github.com/xgi/castero"
# loongarch64: tests fail
arch="noarch !loongarch64"
arch="noarch"
license="MIT"
depends="
py3-beautifulsoup4
@ -18,10 +17,12 @@ depends="
py3-tz
python3
"
makedepends="py3-setuptools"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/xgi/castero/archive/v$pkgver.tar.gz"
source="$pkgname-$pkgver.tar.gz::https://github.com/xgi/castero/archive/v$pkgver.tar.gz
fix-display-tests.patch
"
prepare() {
default_prepare
@ -30,17 +31,20 @@ prepare() {
}
build() {
python3 setup.py build
gpep517 build-wheel --wheel-dir .dist --output-fd 3 3>&1 >&2
}
check() {
pytest -k 'not test_player_vlcplayer'
python3 -m venv --clear --without-pip --system-site-packages .testenv
.testenv/bin/python3 -m installer .dist/*.whl
.testenv/bin/python3 -m pytest -k 'not test_player_vlcplayer'
}
package() {
python3 setup.py install --skip-build --root="$pkgdir"
python3 -m installer -d "$pkgdir" .dist/*.whl
}
sha512sums="
3bd962f8a609dbd37cd133902f1cf8d619749179aeb790339a52849e4222c95b35d396a8b20e8690b412616cb2699fcba3d3ecfc87360579eaa08dfdddc9db30 castero-0.9.5.tar.gz
ccf2d58cf6c700feab8ef68a4c811f7df9489ddbdddc6188b1b7a57c6f247ca9442e813e577a7a252d8ab61a8b60b042338802972118af00ad4343134a45d5a2 fix-display-tests.patch
"

View File

@ -0,0 +1,20 @@
--- castero-0.9.5-origin/tests/test_display.py
+++ castero-0.9.5/tests/test_display.py
@@ -58,7 +58,7 @@
assert display._footer_window.clear.call_count == 1
assert display._footer_window.addstr.call_count == 2
display._footer_window.addstr.assert_any_call(1, 0, "prompt")
- assert display._footer_window.called_with(1, len("prompt"))
+ display._footer_window.addstr.assert_called_with(1, 0, "prompt")
def test_display_get_y_n(display):
@@ -66,7 +66,7 @@
assert display._footer_window.clear.call_count == 1
assert display._footer_window.addstr.call_count == 2
display._footer_window.addstr.assert_any_call(1, 0, "prompt")
- assert display._footer_window.called_with(1, len("prompt"))
+ display._footer_window.addstr.assert_called_with(1, 0, "prompt")
def test_display_input_keys(display):