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

Fix comparison against installed PyTest version #353

Conversation

michaelmanganiello-eb
Copy link

With the current code, introduced in #230, the comparison
pytest.__version__ >= '3.8' returns the wrong result when using
PyTest 3.10, as '3.10' < '3.8' if we use Python's string comparison.

Having PYTEST_VERSION as an integer tuple allows us to have simpler
comparisons.

This fixes the following warning when using PyTest 3.10:

RemovedInPytest4Warning: config.warn has been deprecated, use warnings.warn instead

With the current code, the comparison `pytest.__version__ >= '3.8'`
returns the wrong result when using PyTest 3.10, as `'3.10' < '3.8'` if
we use Python's string comparison.

Having `PYTEST_VERSION` as an integer tuple allows us to have simpler
comparisons.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants