def testUndefinedConstructorKeyword(self):
     # make sure that the given attribute lands in the constructor
     x = QAction(autoRepeat=False)
     self.assertEqual(x.autoRepeat(), False)
     x = QAction(autoRepeat=True)
     self.assertEqual(x.autoRepeat(), True)
     # QAction derives from QObject, and so the missing attributes
     # in the constructor are reported as AttributeError.
     with self.assertRaises(AttributeError):
         QAction(some_other_name=42)