Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
str() on the pytest.raises context variable doesn't behave same as normal exception catch #5412
Pytest 4.6.2, macOS 10.14.5
try: raise LookupError( f"A\n" f"B\n" f"C" ) except LookupError as e: print(str(e))
with pytest.raises(LookupError) as e: raise LookupError( f"A\n" f"B\n" f"C" ) print(str(e))
In order to get the full error message, one must do
Pip list gives
Indeed this is a bit confusing.
I don't see much use for this, I would rather it didn't implement
Which makes it more obvious that this is not what the user intended with
So I think a good solution is to simply delete the
Also, @fiendish which Python version are you using?
I understand, but I think it is better to be explicit here, because users might use