237 |
|
|
238 |
c.move(1) |
c.move(1) |
239 |
assert c.focus == n[8] and c.rotation == 0 |
assert c.focus == n[8] and c.rotation == 0 |
240 |
|
|
241 |
|
|
242 |
|
def testGetRotationNode(): |
243 |
|
c.set(n[2]) |
244 |
|
assert c.getRotationNode(-1) == n[1] |
245 |
|
assert c.getRotationNode(0) == n[2] |
246 |
|
assert c.getRotationNode(1) == n[6] |
247 |
|
|
248 |
|
c.rotation = 3 |
249 |
|
assert c.getRotationNode(-1) == None |
250 |
|
assert c.getRotationNode(0) == n[2] |
251 |
|
assert c.getRotationNode(1) == n[9] |
252 |
|
|
253 |
|
c.rotation = -2 |
254 |
|
assert c.getRotationNode(-1) == None |
255 |
|
assert c.getRotationNode(0) == n[2] |
256 |
|
assert c.getRotationNode(1) == n[4] |