diff options
| author | Paul McMillan <Paul@McMillan.ws> | 2010-07-02 17:51:12 +0000 |
|---|---|---|
| committer | Paul McMillan <Paul@McMillan.ws> | 2010-07-02 17:51:12 +0000 |
| commit | c298937c9434752aa961888e680bfb638230ec62 (patch) | |
| tree | 3447558657b115e6d4988168a672dba11808e00d | |
| parent | 62e587418cdfc8f54b6058072497df47e6ab3abd (diff) | |
[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
| -rw-r--r-- | django/utils/unittest/case.py | 2 |
1 files changed, 1 insertions, 1 deletions
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) |
