Exemple #1
0
 def test_get_is_selected(self):
     tkinter = Tk()
     canvas = Canvas(tkinter, width=500, height=500)
     cell0 = Cell(canvas, 200, 300, 50, "grey")
     self.assertEqual(cell0.get_is_selected(), False)
     cell0.set_is_selected(True)
     self.assertEqual(cell0.get_is_selected(), True)
Exemple #2
0
 def test_set_is_selected(self):
     tkinter = Tk()
     canvas = Canvas(tkinter, width=500, height=500)
     cell0 = Cell(canvas, 200, 300, 50, "grey")
     try:
         cell0.set_is_selected("Hello")
     except ValueError:
         self.assertEqual(cell0.get_is_selected(), False)
     cell0.set_is_selected(True)
     self.assertEqual(cell0.get_is_selected(), True)