Changeset 1540

Show
Ignore:
Timestamp:
07/01/07 03:16:41 (1 year ago)
Author:
arj..@yirdis.nl
Message:

updated doctests for item.py

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • gaphas/trunk/gaphas/item.py

    r1539 r1540  
    329329        True 
    330330        >>> len(c.solver._constraints) 
    331         8 
     331        6 
    332332        >>> len(c.solver._marked_cons) 
    333333        0 
    334334        >>> c.solver.solve() 
    335335        >>> len(c.solver._constraints) 
    336         8 
     336        6 
    337337        >>> len(c.solver._marked_cons) 
    338338        0 
     
    379379        True 
    380380        >>> len(c.solver._constraints) 
    381         8 
     381        6 
    382382        >>> b.teardown_canvas() 
    383383        >>> len(c.solver._constraints) 
  • gaphas/trunk/gaphas/tests/test_element.py

    r1517 r1540  
    2020 
    2121        h_nw, h_ne, h_se, h_sw = handles 
    22         assert h_nw == handles[NW] 
    23         assert h_ne == handles[NE] 
    24         assert h_sw == handles[SW] 
    25         assert h_se == handles[SE] 
     22        assert h_nw is handles[NW] 
     23        assert h_ne is handles[NE] 
     24        assert h_sw is handles[SW] 
     25        assert h_se is handles[SE] 
    2626 
    2727        # to see how many solver was called: 
     
    4141 
    4242        self.assertEquals(110 * count, h_se.x) # h_se changed above, should remain the same 
    43         self.assertEquals(110 * count, h_se.y)  
     43        self.assertEquals(110 * count, float(h_se.y)) 
    4444 
    45         self.assertEquals(110 * count, h_ne.x) 
    46         self.assertEquals(110 * count, h_sw.y) 
     45        self.assertEquals(110 * count, float(h_ne.x)) 
     46        self.assertEquals(110 * count, float(h_sw.y)) 
     47 
  • gaphas/trunk/gaphas/tree.py

    r1532 r1540  
    4242        """ 
    4343        return self._parents.get(node) 
    44 #        for item, children in self._children.items(): 
    45 #            if node in children: 
    46 #                return item 
    4744 
    4845    def get_children(self, node):