(self)
| 374 | print "pattern.graph.GraphSpringLayout._distance" |
| 375 | |
| 376 | def test_repulsion(self): |
| 377 | # Assert repulsive node force. |
| 378 | gl = self.g.layout |
| 379 | d1 = gl._distance(self.g["a"], self.g["c"])[2] |
| 380 | gl.update() |
| 381 | d2 = gl._distance(self.g["a"], self.g["c"])[2] |
| 382 | self.assertTrue(d2 > d1) |
| 383 | self.g.layout.reset() |
| 384 | print "pattern.graph.GraphSpringLayout._repulse()" |
| 385 | |
| 386 | def test_attraction(self): |
| 387 | # Assert attractive edge force. |