Esempio n. 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))
Esempio n. 2
0
 def test_do_activate(self):
     # The cell cannot be activated. It returns True to indicate the
     # event is handled.
     cell = CellRendererGraph()
     self.assertEqual(
         True, cell.do_activate(None, None, None, None, None))
Esempio n. 3
0
 def test_do_editing_started(self):
     # The cell cannot be edited. It returns None.
     cell = CellRendererGraph()
     self.assertEqual(
         None, cell.do_editing_started(None, None, None, None, None))
Esempio n. 4
0
 def test_columns_len(self):
     cell = CellRendererGraph()
     self.assertEqual(0, cell.columns_len)
     cell.columns_len = 1
     self.assertEqual(1, cell.columns_len)