You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally reported by: Alec Reiter (BitBucket: justanr, GitHub: justanr)
I'm writing tests for a small library and I decided to use py.test after hearing so many good things about it.
However, pytest.mark.parameterize is giving me some issues. At first, I thought maybe I just mismatched some parens and it went off looking for a fixture elsewhere. So I decided to start with the given example of parameterize:
Original comment byAlec Reiter (BitBucket: justanr, GitHub: justanr):
I just noticed that and came here to note that I am not very good at spelling. I suppose pytest.mark is generating parametrize automatically from the name, thus it not throwing an error for poor spelling?
Well, you can put literally any mark you want (at the moment - there are
some plans for marks to be predefined/limited by default, but this is not
the current default). You can use them like tags to group related tests in
a very lightweight fashion (then specify that mark to select only those
tests to run). Parametrize is one of the special cases which has extra
behaviour. If you misspell it, pytest just treats it like a tag, but then
the test function doesn't know where its input is coming from, hence the
error about undefined fixtures.
Originally reported by: Alec Reiter (BitBucket: justanr, GitHub: justanr)
I'm writing tests for a small library and I decided to use py.test after hearing so many good things about it.
However,
pytest.mark.parameterize
is giving me some issues. At first, I thought maybe I just mismatched some parens and it went off looking for a fixture elsewhere. So I decided to start with the given example of parameterize:But this gives the same error:
I went off googling, but I couldn't find any answers that applied. Any ideas on how to approach this?
I'm running Python 3.4.0 and py.test 2.6.4 inside of a virtualenv.
The text was updated successfully, but these errors were encountered: