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 compatibility with pytest dev/6.2 #141

Merged
merged 2 commits into from
Dec 16, 2020

Conversation

saimn
Copy link
Contributor

@saimn saimn commented Dec 16, 2020

No description provided.

@saimn saimn added this to the 0.9.0 milestone Dec 16, 2020
@@ -22,7 +22,7 @@

_pytest_version = Version(pytest.__version__)
PYTEST_GT_5 = _pytest_version > Version('5.9.9')
PYTEST_GT_6_2 = _pytest_version > Version('6.2')
PYTEST_GE_6_3 = _pytest_version >= Version('6.3')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was what I actually started with, but somehow didn't work.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, I see that :(

@saimn
Copy link
Contributor Author

saimn commented Dec 16, 2020

It gets more annoying ...

(Pdb) Version(pytest.__version__)
<Version('6.3.0.dev19+g950fbbc32')>
(Pdb) Version(pytest.__version__) >= Version('6.3')
False

@@ -22,7 +22,7 @@

_pytest_version = Version(pytest.__version__)
PYTEST_GT_5 = _pytest_version > Version('5.9.9')
PYTEST_GE_6_3 = _pytest_version >= Version('6.3')
PYTEST_GE_6_3 = _pytest_version.is_devrelease or _pytest_version >= Version('6.3')
Copy link
Contributor

@pllim pllim Dec 16, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or something hacky like this if this doesn't work... 😬

PYTEST_GT_6_2 = _pytest_version > Version('6.2.99')

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works ;), so maybe good enough for now ?

Copy link
Contributor

@pllim pllim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for cleaning up my mess!

@pllim pllim merged commit 6df2955 into scientific-python:master Dec 16, 2020
@saimn saimn deleted the pytestdev branch December 16, 2020 02:28
@saimn
Copy link
Contributor Author

saimn commented Dec 16, 2020

My pleasure ;)

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.

2 participants