How to Check if an Exception Is Raised (or Not) With pytest