(self)
| 384 | print "pattern.graph.GraphSpringLayout._repulse()" |
| 385 | |
| 386 | def test_attraction(self): |
| 387 | # Assert attractive edge force. |
| 388 | gl = self.g.layout |
| 389 | self.g["a"].x = -100 |
| 390 | self.g["b"].y = +100 |
| 391 | d1 = gl._distance(self.g["a"], self.g["b"])[2] |
| 392 | gl.update() |
| 393 | d2 = gl._distance(self.g["a"], self.g["b"])[2] |
| 394 | self.assertTrue(d2 < d1) |
| 395 | print "pattern.graph.GraphSpringLayout._attract()" |
| 396 | |
| 397 | #--------------------------------------------------------------------------------------------------- |
| 398 |