def test_2(self): # Some smoke test v = QtGui.QColor(12, 34, 68) self.assertEqual(v.red, 12) v.red = 17 self.assertEqual(v.red, 17) self.assertEqual(v.green, 34) self.assertEqual(v.blue, 68)
def test_3(self): app = QtWidgets.QApplication(["progname"]) a = QtGui.QAction(None) a.text = "myaction" self.assertEqual(a.text, "myaction") self.trg = 0 a.triggered = self.onTrigger a.trigger() self.assertEqual(self.trg, 17) a.trigger() self.assertEqual(self.trg, 34)