Skip to content

Commit

Permalink
Mention shared_db_wrapper when failing
Browse files Browse the repository at this point in the history
  • Loading branch information
ktosiek committed Sep 5, 2015
1 parent d1fccfb commit 04d304e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pytest_django/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 04d304e

Please sign in to comment.