def test_Stop_cb(self): global widget root = Tkinter.Toplevel() widget = Player(master=root, width=100, height=26, currentFrameIndex=1, startFrame=1, endFrame=10, form2=1, gui=1) widget.Stop_cb() self.assertEqual(widget.stop == 1, True) pause() widget.master.master.destroy()