FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

tests: fix class-scoped fixtures defined as instance methods by polkorny · Pull Request #1218 · python-openapi/openapi-core · GitHub

tests: fix class-scoped fixtures defined as instance methods - #1218

Open
polkorny wants to merge 1 commit into
python-openapi:masterfrom
polkorny:master
Open

tests: fix class-scoped fixtures defined as instance methods#1218
polkorny wants to merge 1 commit into
python-openapi:masterfrom
polkorny:master

Conversation

polkorny commented Jul 31, 2026
edited
Loading

Copy link
Copy Markdown

pytest 9.1 deprecates class-scoped fixtures defined as plain instance methods (PytestRemovedIn10Warning): attributes set on
self in the fixture aren't visible to test methods, since pytest creates a new instance per test but runs the fixture only once per class.

Convert the spec/content/finder fixtures in
test_media_types_finders.py and the spec/responses/finder fixtures in test_responses_finders.py to @classmethod, per
https://docs.pytest.org/en/stable/deprecations.html#class-scoped-fixture-as-instance-method

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

1 participant


Back | FazBrowse Home | New Git URL