Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Disabled tests that require warnings.catch_warnings when running unde…

…r Python 2.5.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17118 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit f6ee168919dd3638dc1a78e8cad068663cf3051e 1 parent 9c30d48
@aaugustin aaugustin authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 tests/modeltests/timezones/tests.py
View
4 tests/modeltests/timezones/tests.py
@@ -2,6 +2,7 @@
import datetime
import os
+import sys
import time
import warnings
@@ -237,6 +238,7 @@ def test_query_dates(self):
#@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 @@ def test_naive_datetime(self):
# 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 @@ def test_naive_datetime_with_microsecond(self):
# 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)
Please sign in to comment.
Something went wrong with that request. Please try again.