From c4f9f5dc5114cc4d343750b0eb5d4abf7f30cb53 Mon Sep 17 00:00:00 2001
From: Antoine Martin <dev@ayakael.net>
Date: Mon, 6 May 2024 09:56:00 -0400
Subject: [PATCH] community/py3-whoosh: enable tests

---
 community/py3-whoosh/APKBUILD | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/community/py3-whoosh/APKBUILD b/community/py3-whoosh/APKBUILD
index 09c56cb871e5..8955e4389de8 100644
--- a/community/py3-whoosh/APKBUILD
+++ b/community/py3-whoosh/APKBUILD
@@ -3,7 +3,7 @@
 pkgname=py3-whoosh
 _pyname="Whoosh"
 pkgver=2.7.4
-pkgrel=1
+pkgrel=2
 arch="noarch"
 pkgdesc="Fast, pure-Python full text indexing, search, and spell checking library"
 url="https://pypi.python.org/project/whoosh"
@@ -20,7 +20,6 @@ source="
 	$pkgname-$pkgver.tar.gz::https://pypi.io/packages/source/W/Whoosh/Whoosh-$pkgver.tar.gz
 	test-fix.patch
 	"
-options="!check" # Failing test units
 builddir="$srcdir"/$_pyname-$pkgver
 subpackages="$pkgname-pyc"
 
@@ -31,7 +30,10 @@ build() {
 }
 
 check() {
-	PYTHONPATH="$builddir"/src pytest -v
+	python3 -m venv --clear --without-pip --system-site-packages .testenv
+	.testenv/bin/python3 -m installer .dist/*.whl
+	# test_minimize_dfa: AssertionError: assert <whoosh.automata.fsa.DFA object at 0x7fe398473ad0> == <whoosh.automata.fsa.DFA object at 0x7fe3984706e0>
+	.testenv/bin/python3 -m pytest -v -k 'not test_minimize_dfa'
 }
 
 package() {
-- 
GitLab