Run fixtures when working with non-python tests #12892
Unanswered
sashko1988
asked this question in
Q&A
Replies: 2 comments 7 replies
-
Currently fixtures are only implemented in python nodes |
Beta Was this translation helpful? Give feedback.
7 replies
-
What a coincidence, I’ve done something similar before! In short, you need to:
It looks like you’ve only done step 1, but not step 2. You can either inherit Then, access def runtest(self) -> None:
self._request._fillfixtures() # call fixture
print(self.funcargs) # has fixture result |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
How can someone run fixtures when working with non-python tests?
https://docs.pytest.org/en/stable/example/nonpython.html#non-python-tests Let's take that example and add a simple session scope fixture with autouse=True. How to make pytest execute that fixture?
conftest.py
example:Even if I add fixtures manually in the item
__init__
, they aren't called anyway:Beta Was this translation helpful? Give feedback.
All reactions