Skip to content

DB blocker: use RuntimeError instead of pytest.fail #781

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 1, 2019

Conversation

blueyed
Copy link
Contributor

@blueyed blueyed commented Nov 1, 2019

pytest fails to handle pytest.fail.Exception when raised in repr, resulting
in confusing "INTERNALERROR" messages, hiding the real failure (since it
happens during reporting).

This changes pytest-django to raise RuntimeError instead.

While this will be fixed via
pytest-dev/pytest#6047 likely, it might be good
to have this anyway (also for older pytest versions).

Fixes #713
Fixes #341

pytest fails to handle `pytest.fail.Exception` when raised in `repr`.

This changes pytest-django to raise `RuntimeError` instead.

Ref: pytest-dev/pytest#6020
Fixes pytest-dev#713
@blueyed blueyed merged commit f444b6a into pytest-dev:master Nov 1, 2019
@blueyed blueyed deleted the pytest-fail branch November 1, 2019 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

INTERNALERROR> Failed: Database access not allowed _django_db_setup fails with data migrations
1 participant