mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Ensure that assertNumQueries doesn't swallow exceptions inside the function.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14405 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -524,7 +524,10 @@ class TransactionTestCase(ut2.TestCase):
|
||||
context.__enter__()
|
||||
try:
|
||||
func(*args, **kwargs)
|
||||
finally:
|
||||
except:
|
||||
context.__exit__(*sys.exc_info())
|
||||
raise
|
||||
else:
|
||||
context.__exit__(*sys.exc_info())
|
||||
|
||||
def connections_support_transactions():
|
||||
|
||||
Reference in New Issue
Block a user