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

Do not rely on _makeitem when collecting instances #21

Closed

Conversation

s-t-e-v-e-n-k
Copy link

SpecInstance relys on _makeitem to construct any instance, which was
removed in pytest 6.1. Instead of overriding that method, define a
collect method that knows how to recurse.

Fixes #12

SpecInstance relys on _makeitem to construct any instance, which was
removed in pytest 6.1. Instead of overriding that method, define a
collect method that knows how to recurse.

Fixes bitprophet#12
@bnavigator
Copy link

bnavigator commented Apr 6, 2022

This has been broken by pytest 7.1 again: https://docs.pytest.org/en/latest/deprecations.html#the-pytest-instance-collector

@bnavigator
Copy link

bnavigator commented Apr 12, 2022

s-t-e-v-e-n-k#1 enhances this to keep it working with pytest 7.

Tested with pytest 3.10 (openSUSE Leap 15.3 python devel project), pytest 6.2 (current Tumbleweed) and pytest 7.1 (upcoming update for Tumbleweed).

@bnavigator
Copy link

Ah, I noticed there is also #10 included into the commit. Oh my.

@bitprophet
Copy link
Owner

This should be fixed as of the latest major release!

@bitprophet bitprophet closed this Dec 31, 2022
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 6 support
3 participants