﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
33278	Use a custom exception type with django.test.testcases._DatabaseFailure	Daniel Hahler	SwastikTripathi	"Currently an `AssertionError` with a message is used in case of blocked DB operations:
{{{
class _DatabaseFailure:
    def __init__(self, wrapped, message):
        self.wrapped = wrapped
        self.message = message

    def __call__(self):
        raise AssertionError(self.message)
}}}
([https://github.com/django/django/blob/dfa1145a22042dcf9e504a5a7edd5557e3e0d07c/django/test/testcases.py#L142-L148 source])

Using a custom/distinctive exception type would allow for better catching and handling of this.
Currently you would have to parse its {{{message}}} and/or look at the stack trace to see if it's this specific error, or a ""normal"" assertion error from a test."	Cleanup/optimization	closed	Testing framework	3.2	Normal	fixed		Simon Charette	Ready for checkin	1	0	0	0	0	0
