/ pytest Public
pytest.raises 3.5.0 breaks for exception classes that look iterable (e.g. spyne.error.RequestNotAllowed) #3372
problem that needs to be addressed
indicates a problem that was introduced in a release which was working previously
I recently update to pytest 3.5.0 and use it to test applications that use spyne.
Unfortunately, my tests that have code like
now break in the lines starting on
with pytest.raisesand give a traceback similar to this one:
The issue didn't come up in previous versions of pytest so I dug a bit and found that
and that this is the cause of these unexpected problems.
I don't know whether exception classes that look iterable are generally disallowed or if this is something that should be supported/fixed in pytest.
I didn't find this behavior change to be mentioned in the changelog but I may have not looked thoroughly enough.
Perhaps you can advise?
Here is some IPython output from my digging:
always_iterableattempts to create an iterable by executing
It works in pytest 3.4.2 where
always_iterableisn't used in function
The text was updated successfully, but these errors were encountered: