diff options
author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2013-05-08 23:12:04 +0200 |
---|---|---|
committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2013-05-08 23:12:46 +0200 |
commit | 832b4a5722ba6b55e7b17c3bac6614ecca9aa88d (patch) | |
tree | 5b9c76430789c78b01b16ec7e86a9acafbc0cae7 /tests/model_regress | |
parent | ea3a378c22c0a61715663b9bf807c786233f70c1 (diff) | |
download | django-832b4a5722ba6b55e7b17c3bac6614ecca9aa88d.tar.gz |
Marked a test as an expected failure on MySQL and Python 3.2.
This test hits a bug in current ports of MySQLdb.
Diffstat (limited to 'tests/model_regress')
-rw-r--r-- | tests/model_regress/tests.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/model_regress/tests.py b/tests/model_regress/tests.py index c1e864c270..71ccb071d2 100644 --- a/tests/model_regress/tests.py +++ b/tests/model_regress/tests.py @@ -2,12 +2,14 @@ from __future__ import absolute_import, unicode_literals import datetime from operator import attrgetter +import sys from django.core.exceptions import ValidationError from django.test import TestCase, skipUnlessDBFeature from django.utils import six from django.utils import tzinfo -from django.db import router +from django.utils import unittest +from django.db import connection, router from django.db.models.sql import InsertQuery from .models import (Worker, Article, Party, Event, Department, @@ -131,6 +133,11 @@ class ModelTests(TestCase): attrgetter("when") ) + if (3,) <= sys.version_info < (3, 3) and connection.vendor == 'mysql': + # In Python < 3.3, datetime.strftime raises an exception for years + # below 1000, and existing MySQL DB-API drivers hit this problem. + test_date_lookup = unittest.expectedFailure(test_date_lookup) + def test_date_filter_null(self): # Date filtering was failing with NULL date values in SQLite # (regression test for #3501, amongst other things). |