def test_inheritance_from_special_types(self):
	# Test that relate, size & traverse function correctly for inherited types
	# as discussed in Notes Apr 14 2005.
	# Testing with a standard type (list) with specially size and relate definitions,
	# and a heapdef'd type (mutnodeset) with size, relate and traverse defs.
	# Test includes more than 1 level of inheritance, since the generic
	# method needs to go over all bases and not just the (first) base.

	hv = self.hv
	hv._hiding_tag_ = []    # Different from default nodeset's hiding_tag
	immnodeset = self.sets.immnodeset
	mutnodeset = self.sets.mutnodeset

	for base in (list, mutnodeset):

	    class T(base):
		__slots__ = 't',

	    class U(T):
		__slots__ = 'u',

	    a = base()
	    t = T()
	    t.t = []
	    u = U()
	    u.t = []
	    u.u = []
	    data = range(16)
	    for x in data:
		a.append(x)
		t.append(x)
		u.append(x)

	    # Test size

	    za = hv.indisize_sum([a])
	    zt = hv.indisize_sum([t])
	    zu = hv.indisize_sum([u])

	    self.assert_(za < zu < zt)

	    # Test traverse

	    self.aseq(hv.relimg([a]), immnodeset(data))
	    self.aseq(hv.relimg([t]), immnodeset(data+[T, t.t]))
	    self.aseq(hv.relimg([u]), immnodeset(data+[U, u.t, u.u]))

	    # Test relate

	    def rel(src, tgt):
		r = hv.relate(src, tgt)
		self.assert_( r != ((),)*len(r) )
		return r

	    self.aseq(rel(t, data[1]), rel(a, data[1]))
	    self.aseq(rel(u, data[1]), rel(a, data[1]))
	    self.aseq(rel(u, u.t), rel(t, t.t))
	    rel(u, u.u)
dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/guppy-0.1.10/guppy/heapy/test/test_heapyc.py/TestHeapView.test_inheritance_from_special_types/swapped operands of `<`