Skip to content

Adapt to Node API change#12

Merged
twmr merged 1 commit intomasterfrom
nodeapi
Apr 1, 2020
Merged

Adapt to Node API change#12
twmr merged 1 commit intomasterfrom
nodeapi

Conversation

@twmr
Copy link
Owner

@twmr twmr commented Apr 1, 2020

The Node API was changed in pytest 5.4 in
pytest-dev/pytest#5975.

This commit adds support for the new API but maintains backwards
compatiblity.

Closes: #11

The Node API was changed in pytest 5.4 in
pytest-dev/pytest#5975.

This commit adds support for the new API but maintains backwards
compatiblity.

Closes: #11
@twmr twmr merged commit 5123745 into master Apr 1, 2020
import sys
import traceback

from pkg_resources import parse_version
Copy link

Choose a reason for hiding this comment

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

Note that this adds quite some overhead.
See pytest-dev/pytest-django#826

Copy link

Choose a reason for hiding this comment

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

As for the change itself you could also just look for the from_parent attribute, or require pytest 5.4 (like pytest-asyncio does it). I'd prefer the former.

Copy link
Owner Author

@twmr twmr Apr 2, 2020

Choose a reason for hiding this comment

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

Thx @blueyed for this info! I've just fixed this in the master branch.

@twmr twmr deleted the nodeapi branch April 2, 2020 21:12
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.

pytest-sphinx is not working with pytest v5.4.0 (released on March 12th 2020)

2 participants