zivid / zivid-python

Official Python package for Zivid 3D cameras
BSD 3-Clause "New" or "Revised" License
40 stars 14 forks source link

Randomize Unit Test Execution Order #255

Closed johningve closed 8 months ago

johningve commented 8 months ago

This PR randomizes the order unit tests are executed in. In the process of enabling this I also fixed several order-dependency problems in the unit tests.

johningve commented 8 months ago

Hmm, looks like pytest-randomly doesn't support Python 3.7 :(

johningve commented 8 months ago

Python 3.7 is EOL since this summer. @eskaur should we drop support?

eskaur commented 8 months ago

Python 3.7 is EOL since this summer. @eskaur should we drop support?

@johningve Fine by me, but not really my call anymore. Two things:

johningve commented 8 months ago

@eskaur Two things are needed to bring back 3.7 and at the same time support 3.12:

  1. pytest-randomly needs to be frozen at version 3.12. This version does not claim to support Python 3.12, but it appears to work.
  2. _version.py needs to use a fallback on 3.7 since 3.7 doesn't have importlib.metadata.
eskaur commented 8 months ago

@eskaur Two things are needed to bring back 3.7 and at the same time support 3.12:

  1. pytest-randomly needs to be frozen at version 3.12. This version does not claim to support Python 3.12, but it appears to work.
  2. _version.py needs to use a fallback on 3.7 since 3.7 doesn't have importlib.metadata.
  1. If it seems to work then I think we can go for that for now.
  2. If this is true, how did it work with 3.7 last week? EDIT: Aha you change version.py in this PR.
johningve commented 8 months ago

The previous PR changed _version.py to use importlib.metadata.