Example #1
0
 def test_do_get_size(self):
     # The layout offset and size is based by cell.box_size(widget)
     # box_size is cached, and this can be set ensure a predictable result.
     cell = CellRendererGraph()
     cell.columns_len = 1
     cell._box_size = 21
     treeview = Gtk.TreeView()
     self.assertEqual(
         (0, 0, 44, 22), cell.do_get_size(treeview, None))
Example #2
0
 def test_columns_len(self):
     cell = CellRendererGraph()
     self.assertEqual(0, cell.columns_len)
     cell.columns_len = 1
     self.assertEqual(1, cell.columns_len)