From 04d304e6ae9a9e608582aa0a679dfe842991129b Mon Sep 17 00:00:00 2001 From: Tomasz Kontusz Date: Sat, 5 Sep 2015 12:27:33 +0200 Subject: [PATCH] Mention shared_db_wrapper when failing --- pytest_django/fixtures.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pytest_django/fixtures.py b/pytest_django/fixtures.py index 0978b185c..17233b21a 100644 --- a/pytest_django/fixtures.py +++ b/pytest_django/fixtures.py @@ -223,7 +223,9 @@ def wrapper(request): with _django_cursor_wrapper: if not connection.features.supports_transactions: - raise Exception("Database doesn't support transactions.") + raise Exception( + "shared_db_wrapper cannot be used when " + "the database doesn't support transactions.") exc_type, exc_value, traceback = DummyException, DummyException(), None # Use atomic instead of calling .savepoint* directly.