Skip to content

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

Merged
blueyed merged 2 commits intopytest-dev:masterfrom
blueyed:pytest-fail
Nov 1, 2019
Merged

DB blocker: use RuntimeError instead of pytest.fail#781
blueyed merged 2 commits intopytest-dev:masterfrom
blueyed:pytest-fail

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