backports/py3-dateparser: fix tests

This commit is contained in:
Antoine Martin 2024-11-30 13:19:07 -05:00
parent 51a3f048ca
commit f4bedbfab6
Signed by: forge
GPG key ID: D62A472A4AA7D541

View file

@ -1,8 +1,8 @@
# Maintainer: Hoang Nguyen <folliekazetani@protonmail.com>
maintainer="Hoang Nguyen <folliekazetani@protonmail.com>"
pkgname=py3-dateparser
_pyname=${pkgname#py3-}
pkgver=1.2.0
pkgrel=1
pkgrel=0
pkgdesc="Python parser for human readable dates"
url="https://github.com/scrapinghub/dateparser"
arch="noarch"
@ -41,14 +41,9 @@ build() {
check() {
# test_relative_base_setting_2_en fails due to tzinfo mismatch
_test_filter="not test_parsing_date_should_fail_using_datetime_strptime_if_locale_is_non_english \
and not test_relative_base_setting_2_en"
# test_custom_language_detect_fast_text fails due to wrong file format
case "$CARCH" in
s390x)
_test_filter="$_test_filter and not test_custom_language_detect_fast_text"
;;
esac
_test_filter="not test_parsing_date_should_fail_using_datetime_strptime_if_locale_is_non_english \
and not test_relative_base_setting_2_en and not test_custom_language_detect_fast_text"
python3 -m venv --clear --without-pip --system-site-packages .testenv
.testenv/bin/python3 -m installer .dist/*.whl