-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
adding hooks for controlling instances of tests #46
Labels
type: enhancement
new feature or API change, should be merged into features branch
Comments
Original comment by Ronny Pfannschmidt (BitBucket: RonnyPfannschmidt, GitHub: RonnyPfannschmidt): you are outlining a very complex topic, which hard to get right, could you explain in more depth what your specific use-case is |
Original comment by Ronny Pfannschmidt (BitBucket: RonnyPfannschmidt, GitHub: RonnyPfannschmidt): can this be closed? |
pytestbot
added
the
type: enhancement
new feature or API change, should be merged into features branch
label
Jun 15, 2015
This was referenced Aug 29, 2017
fkohlgrueber
pushed a commit
to fkohlgrueber/pytest
that referenced
this issue
Oct 27, 2018
mgorny
pushed a commit
to mgorny/pytest
that referenced
this issue
May 27, 2023
… case we're not in an activated venv
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Originally reported by: BitBucket: ddandd, GitHub: ddandd
adding pytest_collect_instances(class_item), that will return the test instances of a test_class and each test on an instance will have the same instance object (self)
It should be used when writing long and complicated generated tests, it'll allow calling a setup_instance method that would be able to get funcargs, or calling the init (that will require to add a pytest_collect_can_initialize_class or a similar hook)
The text was updated successfully, but these errors were encountered: