From c298937c9434752aa961888e680bfb638230ec62 Mon Sep 17 00:00:00 2001 From: Paul McMillan Date: Fri, 2 Jul 2010 17:51:12 +0000 Subject: [PATCH] [soc2010/test-refactor] small fix to allow unittest2 to compare ValuesQuerySet using assertItemsEqual git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2010/test-refactor@13413 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/utils/unittest/case.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/utils/unittest/case.py b/django/utils/unittest/case.py index a855398bc2..fa0992c19b 100644 --- a/django/utils/unittest/case.py +++ b/django/utils/unittest/case.py @@ -898,7 +898,7 @@ class TestCase(unittest.TestCase): expected.sort() actual = actual_seq[:] actual.sort() - except TypeError: + except (TypeError, AttributeError): # Unsortable items (example: set(), complex(), ...) expected = list(expected_seq) actual = list(actual_seq)