1
0
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:
Alex Gaynor
2011-03-28 05:58:43 +00:00
parent b4f0c1a775
commit e54c0a0c94
9 changed files with 187 additions and 215 deletions

View File

@@ -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():
"""