# Pytest upgrade broke our tests (pytest-cov out of sync?)

**URL:** <https://travis-ci.community/t/pytest-upgrade-broke-our-tests-pytest-cov-out-of-sync/1743>\
**Category:** Python\
**Created:** [January 9, 2019, 8:38am UTC](https://travis-ci.community/t/pytest-upgrade-broke-our-tests-pytest-cov-out-of-sync/1743 "2019-01-09T08:38:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tripleee](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/tripleee/32/915_2.png) [@tripleee](https://travis-ci.community/u/tripleee)\
**Post date:** [January 9, 2019, 8:38am UTC](https://travis-ci.community/t/pytest-upgrade-broke-our-tests-pytest-cov-out-of-sync/1743/1 "2019-01-09T08:38:42Z")

</div>

The Travis version of `pytest` seems to have been upgraded from `4.0.2` to `4.1.0` three days ago. Since then, all our test have been failing.

I was able to repro locally by installing `pytest==4.1.0` and `pytest-cov==2.6.0` which corresponds to the versions installed on Travis.

Updating to `pytest-cov=2.6.1` fixes my build locally again, though.

Could you consider also upgrading `pytest-cov` in Travis to fix things for us?

Example of a failed build: [https://travis-ci.org/Charcoal-SE/SmokeDetector/builds/477194185?utm\_source=github\_status&utm\_medium=notification](https://travis-ci.org/Charcoal-SE/SmokeDetector/builds/477194185?utm_source=github_status&utm_medium=notification)

GitHub ticket for our project: [https://github.com/Charcoal-SE/SmokeDetector/issues/2587](https://github.com/Charcoal-SE/SmokeDetector/issues/2587)

---

<div class="post-metadata">

**Author:** ![tripleee](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/tripleee/32/915_2.png) [@tripleee](https://travis-ci.community/u/tripleee)\
**Post date:** [January 9, 2019, 10:16am UTC](https://travis-ci.community/t/pytest-upgrade-broke-our-tests-pytest-cov-out-of-sync/1743/2 "2019-01-09T10:16:20Z")

</div>

For what it’s worth, a temporary workaround was implemented in our repo, but this might still be affecting others too.

---

<div class="post-metadata">

**Author:** ![BanzaiMan](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/banzaiman/32/67_2.png) [@BanzaiMan](https://travis-ci.community/u/BanzaiMan)\
**Post date:** [January 9, 2019, 1:07pm UTC](https://travis-ci.community/t/pytest-upgrade-broke-our-tests-pytest-cov-out-of-sync/1743/3 "2019-01-09T13:07:36Z")

</div>

Your requirements.txt had a weak requirement (`pytest>=3.4.1`), and when a new release came out and you ran `pip3 install -r requirements.txt --upgrade`, `pip3` happily [downloaded and used version 4.1.0](https://travis-ci.org/Charcoal-SE/SmokeDetector/builds/476006742#L2152-L2154) instead. In the last passing build, you see that [it uses 4.0.2](https://travis-ci.org/Charcoal-SE/SmokeDetector/builds/475951754#L2152) from the cache.
