Skip to content
Browse files

Marked a test as an expected failure on MySQL and Python 3.2.

This test hits a bug in current ports of MySQLdb.
  • Loading branch information...
1 parent ea3a378 commit 832b4a5722ba6b55e7b17c3bac6614ecca9aa88d @aaugustin aaugustin committed
Showing with 8 additions and 1 deletion.
  1. +8 −1 tests/model_regress/
9 tests/model_regress/
@@ -2,12 +2,14 @@
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 @@ def test_date_lookup(self):
+ 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).

0 comments on commit 832b4a5

Please sign in to comment.
Something went wrong with that request. Please try again.