Skip to content

Commit c298937

Browse files
committed
[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
1 parent 62e5874 commit c298937

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

django/utils/unittest/case.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -898,7 +898,7 @@ def assertItemsEqual(self, expected_seq, actual_seq, msg=None):
898898
expected.sort()
899899
actual = actual_seq[:]
900900
actual.sort()
901-
except TypeError:
901+
except (TypeError, AttributeError):
902902
# Unsortable items (example: set(), complex(), ...)
903903
expected = list(expected_seq)
904904
actual = list(actual_seq)

0 commit comments

Comments
 (0)