Mercurial > p > roundup > code
diff test/db_test_base.py @ 3692:8e52157e2073
More transitive-property work.
- Add some more tests that break the current SQL backend implementation
for transitive properties. One of them looks like a Postgres bug to
me -- I'm getting:
"""ProgrammingError: ERROR: relation "_user2" does not exist"""
where _user2 is an alias for _user in the from clause (but _user2 is
used in a left outer join). The other SQL backends are fine with the
generated SQL. Hmm. One of the reasons for packing sort and search
attributes into the same data structure was the optimized SQL: not
creating a left outer join for attributes that are already in a normal
join (from/where clause). I'll check if I can instead leave the
attribute from the from-clause instead (or if I'm then getting errors
from the other backends, Postgres seems fine with that).
| author | Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net> |
|---|---|
| date | Wed, 30 Aug 2006 08:50:44 +0000 |
| parents | 4d9adb8bc3b1 |
| children | e754cc14e76a |
line wrap: on
line diff
--- a/test/db_test_base.py Tue Aug 29 09:47:41 2006 +0000 +++ b/test/db_test_base.py Wed Aug 30 08:50:44 2006 +0000 @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: db_test_base.py,v 1.77 2006-08-23 12:57:10 schlatterbeck Exp $ +# $Id: db_test_base.py,v 1.78 2006-08-30 08:50:44 schlatterbeck Exp $ import unittest, os, shutil, errno, imp, sys, time, pprint, sets @@ -1122,6 +1122,8 @@ ['4', '3']) ae(filt(None, {'priority.order':'3'}, ('+','status'), ('+','priority')), ['4', '3']) + ae(filt(None, {'priority':['2','3']}, ('+','priority'), ('+','status')), + ['1', '4', '2', '3']) ae(filt(None, {}, ('+','priority'), ('+','status')), ['1', '4', '2', '3']) @@ -1252,6 +1254,16 @@ ('+','assignedto.supervisor.supervisor'), ('-','assignedto.supervisor'), ('+','assignedto'), ('+','status')]), ['4', '5', '7', '6', '8', '1', '2', '3']) + ae(filt(None, {'assignedto':['6','7','8','9','10']}, + [('+','assignedto.supervisor.supervisor.supervisor'), + ('+','assignedto.supervisor.supervisor'), + ('-','assignedto.supervisor'), ('+','assignedto'), ('+','status')]), + ['4', '5', '7', '6', '8', '1', '2', '3']) + ae(filt(None, {'assignedto':['6','7','8','9']}, + [('+','assignedto.supervisor.supervisor.supervisor'), + ('+','assignedto.supervisor.supervisor'), + ('-','assignedto.supervisor'), ('+','assignedto'), ('+','status')]), + ['4', '5', '1', '2', '3']) def testFilteringTransitiveLinkSortNull(self): """Check sorting of NULL values"""
