55 |
return [t,r,s,v,u,w].index(self.get(r1)) \ |
return [t,r,s,v,u,w].index(self.get(r1)) \ |
56 |
- [t,r,s,v,u,w].index(self.get(r2)) |
- [t,r,s,v,u,w].index(self.get(r2)) |
57 |
|
|
58 |
|
def isActivated(scene, cs): |
59 |
|
pt = scene.coords.transformPoint(cs, 0, 0, None) |
60 |
|
return scene.coords.getCSAt(0, pt.x, pt.y, None) == cs |
61 |
|
|
62 |
|
|
63 |
def testNullRotation(): |
def testNullRotation(): |
64 |
r.addProperty(p, s) |
r.addProperty(p, s) |
65 |
r.addProperty(p, t) |
r.addProperty(p, t) |
124 |
# this works only if all nodes are same size... XXX |
# this works only if all nodes are same size... XXX |
125 |
assert (ps.x - pr.x) == (pr.x - pw.x) |
assert (ps.x - pr.x) == (pr.x - pw.x) |
126 |
|
|
127 |
|
# Test that all node coordinate systems are activated |
128 |
|
# (clickable). |
129 |
|
for x in (cs_r, cs_s, cs_t, cs_u, cs_v, cs_w): |
130 |
|
assert isActivated(vs, x) |
131 |
|
|
132 |
# Test that SimpleView calls its NodeView |
# Test that SimpleView calls its NodeView |
133 |
# with all the correct parameters. |
# with all the correct parameters. |
134 |
|
|