Author: aaugustin
Date: 2011-11-19 23:40:19 -0800 (Sat, 19 Nov 2011)
New Revision: 17118
Modified:
django/trunk/tests/modeltests/timezones/tests.py
Log:
Disabled tests that require warnings.catch_warnings when running under Python
2.5.
Modified: django/trunk/tests/modeltests/timezones/tests.py
===================================================================
--- django/trunk/tests/modeltests/timezones/tests.py 2011-11-19 23:27:20 UTC
(rev 17117)
+++ django/trunk/tests/modeltests/timezones/tests.py 2011-11-20 07:40:19 UTC
(rev 17118)
@@ -2,6 +2,7 @@
import datetime
import os
+import sys
import time
import warnings
@@ -237,6 +238,7 @@
#@override_settings(USE_TZ=True)
class NewDatabaseTests(BaseDateTimeTests):
+ @skipIf(sys.version_info < (2, 6), "this test requires Python >= 2.6")
def test_naive_datetime(self):
dt = datetime.datetime(2011, 9, 1, 13, 20, 30)
with warnings.catch_warnings(record=True) as recorded:
@@ -248,6 +250,7 @@
# naive datetimes are interpreted in local time
self.assertEqual(event.dt, dt.replace(tzinfo=EAT))
+ @skipIf(sys.version_info < (2, 6), "this test requires Python >= 2.6")
@skipUnlessDBFeature('supports_microsecond_precision')
def test_naive_datetime_with_microsecond(self):
dt = datetime.datetime(2011, 9, 1, 13, 20, 30, 405060)
@@ -260,6 +263,7 @@
# naive datetimes are interpreted in local time
self.assertEqual(event.dt, dt.replace(tzinfo=EAT))
+ @skipIf(sys.version_info < (2, 6), "this test requires Python >= 2.6")
@skipIfDBFeature('supports_microsecond_precision')
def test_naive_datetime_with_microsecond_unsupported(self):
dt = datetime.datetime(2011, 9, 1, 13, 20, 30, 405060)
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.