kolibri icon indicating copy to clipboard operation
kolibri copied to clipboard

Update pytest to 6.2.5

Open rtibbles opened this issue 1 year ago • 4 comments
trafficstars

Our version of pytest was pinned to a very old version for back compatibility with Python 2.7.

Now that we have dropped support for 2.7, we can upgrade pytest to versions that support Python 3.6 and above.

While technically, 7.0.1 may work, there have been issues reported with Python 3.10 (cc @jredrejo), so it seems safer to upgrade to 6.2.5, as we would not be able to upgrade to newer versions of the 7 series, as they drop support for Python 3.6, which we still support.

We would also need to update any pytest plugins, and remove the existing patching of pytest for Python 3.10 compatibility.

### Acceptance Criteria
- [ ] Update pytest and pytest plugins
- [ ] Remove patching for pytest for Python 3.10 compatibility

rtibbles avatar Jan 12 '24 19:01 rtibbles

I would like to give this a try. Can i be assigned to this one?

thesujai avatar Jan 14 '24 13:01 thesujai

Hi @thesujai! Sure! I have assigned this issue to you :open_hands:. Let us know if you have any questions.

AlexVelezLl avatar Jan 15 '24 13:01 AlexVelezLl

@rtibbles how do i approach this one. How I amd doing is going through https://docs.pytest.org/en/stable/changelog.html and checking for the Removals.

thesujai avatar Jan 17 '24 14:01 thesujai

There are two ways of doing it - you can go through the changelog and check for removals, or you can just do the upgrade and then run pytest locally to see what breaks!

I would suggest a hybrid strategy - get a good sense of what has changed in the Changelog, and if you can see any obvious things that you can preempt that might be a problem with the upgrade, try to fix those alongside the initial upgrade. Then try out running pytest and see what breaks to start to fix it.

To reduce your iteration time, you can also run pytest with only a single test file (it shouldn't matter too much which one it is, but maybe try a couple).

rtibbles avatar Jan 17 '24 15:01 rtibbles

Fixed in #11759

rtibbles avatar Jul 17 '24 22:07 rtibbles