If you expect a test to fail, use pytest xfail marker. This will prevent pytest from marking a test as failed when there is an exception.
To be more specific about what exception you expect to see, use the raises argument.
If you expect a test to fail, use pytest xfail marker. This will prevent pytest from marking a test as failed when there is an exception.
To be more specific about what exception you expect to see, use the raises argument.