mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Move the Python 2.5 specific tests out of their own special files now that 2.5 is the default. Also add __futre__ import where necessary.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15935 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
from __future__ import with_statement
|
||||
|
||||
import re
|
||||
import sys
|
||||
from functools import wraps
|
||||
@@ -531,15 +533,8 @@ class TransactionTestCase(ut2.TestCase):
|
||||
return context
|
||||
|
||||
# Basically emulate the `with` statement here.
|
||||
|
||||
context.__enter__()
|
||||
try:
|
||||
with context:
|
||||
func(*args, **kwargs)
|
||||
except:
|
||||
context.__exit__(*sys.exc_info())
|
||||
raise
|
||||
else:
|
||||
context.__exit__(*sys.exc_info())
|
||||
|
||||
def connections_support_transactions():
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user