Tests: Use pytest.skip instead of unittest.SkipTest, now that's broken in pytest 9.0#9459
Conversation
| def test_request_exportable_certificate(): | ||
| if not settings.TEST_DECORATOR_MODE: | ||
| raise SkipTest("Can only change setting in DecoratorMode") | ||
| raise pytest.skip("Can only change setting in DecoratorMode") |
There was a problem hiding this comment.
| raise pytest.skip("Can only change setting in DecoratorMode") | |
| pytest.skip("Can only change setting in DecoratorMode") |
This raises its own exception:
https://github.com/pytest-dev/pytest/blob/6eb7609c7d738da904de5c8b0b7c9c2a80ddf3e0/src/_pytest/outcomes.py#L137-L142
but you should use it like a normal function call.
|
It might be simpler to pin to |
Yeah, I agree. I wasn't quite sure that the |
|
Oh nice, I didn't see they had reverted. Yeah, I'd expect them to publish a patch version and yank 9.0.0 (so you shouldn't need to exclude it) soon. |
Relevant bug report: pytest-dev/pytest#13895
It looks like it may be reverted, but that's still under discussion, and 200+ of our tests break because of it. So I'll probably just merge anyway.