Open edschofield opened 4 years ago
Thanks for reprorting this issue with such detail (I really like the focus on the user perspective). Off the top of my head, I have no idea what could be the issue. I'll investigate.
Not sure, there is anything I can do about it. I will leave the issue open for now. Maybe something will come to mind.
The reason for this behavior is the following:
Put differently: the normal pytest the failure appears, when the test function is defined. In ipytest the failure is only caught, when the test is executed.
The following code fails with a misleading error message:
The error message is:
The error message is misleading because the cause is actually that
parameterize
has a different spelling to theparametrize
spelling expected by pytest.This is an easy mistake to make and, with the above error, it can be difficult to understand how to solve the problem. According to various dictionaries (e.g. https://www.merriam-webster.com/dictionary/parameterize), the verbs "parameterize" and "parametrize" are variants. A quick Google search turns up 1.97 million hits for "parameterize" versus 763,000 hits for "parametrize".
For reference, using
pytest
by itself (withoutipytest
) gives a much more useful error message: