(self)
| 23 | class GeometryTest(unittest.TestCase): |
| 24 | |
| 25 | def _setup_equality_example(self): |
| 26 | # Create 4 nodes a, b, c, d |
| 27 | # and their lengths |
| 28 | a = gm.Segment('a') |
| 29 | la = gm.Length('l(a)') |
| 30 | a.connect_to(la) |
| 31 | la.connect_to(a) |
| 32 | |
| 33 | b = gm.Segment('b') |
| 34 | lb = gm.Length('l(b)') |
| 35 | b.connect_to(lb) |
| 36 | lb.connect_to(b) |
| 37 | |
| 38 | c = gm.Segment('c') |
| 39 | lc = gm.Length('l(c)') |
| 40 | c.connect_to(lc) |
| 41 | lc.connect_to(c) |
| 42 | |
| 43 | d = gm.Segment('d') |
| 44 | ld = gm.Length('l(d)') |
| 45 | d.connect_to(ld) |
| 46 | ld.connect_to(d) |
| 47 | |
| 48 | # Now let a=b, b=c, a=c, c=d |
| 49 | la.merge([lb], 'fact1') |
| 50 | lb.merge([lc], 'fact2') |
| 51 | la.merge([lc], 'fact3') |
| 52 | lc.merge([ld], 'fact4') |
| 53 | return a, b, c, d, la, lb, lc, ld |
| 54 | |
| 55 | def test_merged_node_representative(self): |
| 56 | _, _, _, _, la, lb, lc, ld = self._setup_equality_example() |
no test coverage detected