Exemple #1
0
    def test_nodeset_relation(self):
	from guppy.sets import immnodeset, mutnodeset
        if 0:
            # This is hard to get to work accross different architectures
            # Noted Jan 17 2006
            x = [0, 1, 'a', 'b']
            x.sort(lambda a, b: cmp(id(a), id(b)))
        else:
            # This is a relaxed variant, still tests SOME thing!
            x = ['a']
	for s in (immnodeset(x), mutnodeset(x)):
	    for i in range(len(x)):
		self.chkrel(s, x[i], 'list(%%s)[%s]'%i)
Exemple #2
0
 def test_nodeset_relation(self):
     from guppy.sets import immnodeset, mutnodeset
     if 0:
         # This is hard to get to work accross different architectures
         # Noted Jan 17 2006
         x = [0, 1, 'a', 'b']
         x.sort(lambda a, b: cmp(id(a), id(b)))
     else:
         # This is a relaxed variant, still tests SOME thing!
         x = ['a']
     for s in (immnodeset(x), mutnodeset(x)):
         for i in range(len(x)):
             self.chkrel(s, x[i], 'list(%%s)[%s]' % i)
Exemple #3
0
 def test_nodeset_relation(self):
     from guppy.sets import immnodeset, mutnodeset
     x = ['a']
     for s in (immnodeset(x), mutnodeset(x)):
         for i in range(len(x)):
             self.chkrel(s, x[i], 'list(%%s)[%s]' % i)