]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Improve _test_get_unique_constraints()
authorRoman Podolyaka <roman.podolyaka@gmail.com>
Sat, 22 Jun 2013 10:35:41 +0000 (13:35 +0300)
committerRoman Podolyaka <roman.podolyaka@gmail.com>
Sun, 23 Jun 2013 07:35:46 +0000 (10:35 +0300)
Call eq_() in a loop instead of comparing two lists
directly. This makes it much easier to find out which
element is not equal to the reference value.

lib/sqlalchemy/testing/suite/test_reflection.py

index 858ca8a77eb2285780aa30ef8787fc77762a503a..16061780e033f68e3c060ea9cf259f1971496f2e 100644 (file)
@@ -396,7 +396,8 @@ class ComponentReflectionTest(fixtures.TablesTest):
             key=operator.itemgetter('name')
         )
 
-        eq_(uniques, reflected)
+        for orig, refl in zip(uniques, reflected):
+            eq_(orig, refl)
 
 
     @testing.provide_metadata