diff --git a/tox.ini b/tox.ini
index 0594b2d2a9668089414d04862e00941a7f289094..2e05b9739e2c0288f142b93c0a6a9c10975569bb 100644
--- a/tox.ini
+++ b/tox.ini
@@ -12,7 +12,8 @@ commands =
   pytest --cov=nerval {posargs}
 
 deps =
-  pytest
+  # TODO: Remove this once https://gitlab.teklia.com/ner/nerval/-/issues/27 is done
+  pytest<8
   pytest-lazy-fixture
   pytest-cov
   -rrequirements.txt