pytest-cov recently updated their requirements from >=3.6 to >=4.6 (see here), while the pre-installed pytest in Python3.6 and 3.7 seems to be 4.3.1 . See e.g. https://travis-ci.com/github/sjvrijn/mf2/jobs/348514594 as an example, where Python3.8 (with default pytest 5.2.1) builds just fine.
Pip doesn’t reevaluate its pytest version when
pytest is listed before
pytest-cov in the requirements.txt. For my repo I’ve solved the issue by adding
-U to my
pip install -r requirements-dev.txtline, but I probably won’t be the only one with this issue…
Requirement already satisfied: pytest in /home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages (from -r requirements-dev.txt (line 6)) (4.3.1)
pytest-cov 2.10.0 has requirement pytest>=4.6, but you’ll have pytest 4.3.1 which is incompatible.