Is there a workaround for instantiating fixtures when developing within unit tests? #11484
Unanswered
mikewojnowicz
asked this question in
Q&A
Replies: 1 comment
-
I'd suggest just running the test via pytest instead. If you're using IPython, you might want to use ipytest to do so. |
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
-
When I'm developing, I would like to write test code that looks like this:
and then interact with the arguments of
test_my_function
.In particular, after the
breakpoint()
launches the python debugger, I enter ipython, preserving contents of memory, via a commandipy
, which is aliased in my.pdbc
toThis workflow lets me interact with the arguments of
test_my_function
-- e.g. to check their type and dimensionality, experiment with various transformations, etc.The problem is that when
argument1
andargument2
are pytest fixtures, my workflow is broken (I believe as of pytest v6.0.0). Previously, I could writeargument1=argument1()
and interact withargument1
. Now I cannot.Some questions:
Beta Was this translation helpful? Give feedback.
All reactions