diff --git a/requirements.txt b/requirements.txt
index af65afd3aa48fc9c40b43cad93505cc9d2fb86b8..767ffadb530f5a2664aeb458f50225f7749af0f3 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -41,7 +41,8 @@ voeventlib==1.2; python_version >= '3'
 # problematic API changes in 2.3.1 and beyond that will need to be handled
 # appropriately.
 pyparsing==2.3.0
-pytest<5
+pytest<5; python_version < '3'
+pytest==5.1.2; python_version >= '3'
 pytest-cov==2.6.1
 pytest-django==3.4.8
 pytz==2018.9