devtools/testlib.py
changeset 4036 137be4878127
parent 4016 250784a2d105
child 4053 7cc66b1d9183
equal deleted inserted replaced
4033:732eccbed54a 4036:137be4878127
   754         edict = {}
   754         edict = {}
   755         for etype in unprotected_entities(self.schema, strict=True):
   755         for etype in unprotected_entities(self.schema, strict=True):
   756             rset = cu.execute('%s X' % etype)
   756             rset = cu.execute('%s X' % etype)
   757             edict[str(etype)] = set(row[0] for row in rset.rows)
   757             edict[str(etype)] = set(row[0] for row in rset.rows)
   758         existingrels = {}
   758         existingrels = {}
   759         ignored_relations = SYSTEM_RELATIONS + self.ignored_relations
   759         ignored_relations = SYSTEM_RELATIONS | self.ignored_relations
   760         for rschema in self.schema.relations():
   760         for rschema in self.schema.relations():
   761             if rschema.final or rschema in ignored_relations:
   761             if rschema.final or rschema in ignored_relations:
   762                 continue
   762                 continue
   763             rset = cu.execute('DISTINCT Any X,Y WHERE X %s Y' % rschema)
   763             rset = cu.execute('DISTINCT Any X,Y WHERE X %s Y' % rschema)
   764             existingrels.setdefault(rschema.type, set()).update((x, y) for x, y in rset)
   764             existingrels.setdefault(rschema.type, set()).update((x, y) for x, y in rset)