Skip to content

Commit 04d304e

Browse files
committed
Mention shared_db_wrapper when failing
1 parent d1fccfb commit 04d304e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pytest_django/fixtures.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,9 @@ def wrapper(request):
223223

224224
with _django_cursor_wrapper:
225225
if not connection.features.supports_transactions:
226-
raise Exception("Database doesn't support transactions.")
226+
raise Exception(
227+
"shared_db_wrapper cannot be used when "
228+
"the database doesn't support transactions.")
227229

228230
exc_type, exc_value, traceback = DummyException, DummyException(), None
229231
# Use atomic instead of calling .savepoint* directly.

0 commit comments

Comments
 (0)