Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some tests broken when run with Pytest v8 #1264

Closed
matt-graham opened this issue Jan 30, 2024 · 0 comments · Fixed by #1275
Closed

Some tests broken when run with Pytest v8 #1264

matt-graham opened this issue Jan 30, 2024 · 0 comments · Fixed by #1275
Labels
bug Something isn't working tests

Comments

@matt-graham
Copy link
Collaborator

The scheduled daily tests workflows have been failing since 28th January which coincided with a new Pytest major version release. Checking the logs for the last passing workflow on 27th January, tox installed pytest==7.44 in the test environment while as on the failing runs pytest==8.0.0 was installed.

In the longer term we will want to update the tests so they run on Pytest v8, and probably also have some system for alerting us to deprecations (for example running tests at some regular interval, e.g. weekly, with deprecation warnings filtered to raise an error) so we can be more proactive about fixing them.

For now a quick fix would be to just pin the pytest version in the tox.ini file to 7.4.4

TLOmodel/tox.ini

Lines 28 to 31 in fac71f8

deps =
-r{toxinidir}/requirements/base.txt
pytest
pytest-cov

@matt-graham matt-graham added bug Something isn't working tests labels Jan 30, 2024
matt-graham added a commit that referenced this issue Jan 30, 2024
Quick fix for #1264 - not linking to close that issue as ideally we should in the longer term fix the tests to work with Pytest v8 and remove the pins.
tamuri pushed a commit that referenced this issue Jan 30, 2024
* Pin `pytest` version installed by `tox`

Quick fix for #1264 - not linking to close that issue as ideally we should in the longer term fix the tests to work with Pytest v8 and remove the pins.

* Fix pytest version specifier
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working tests
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant