def testPropertyNonExist(self): unit = Unit(1) with self.assertRaises(RuntimeError): str = unit.getProperty('strength') pass
def testProperty(self): unit = Unit(1) unit.setProperty('hitPoints', 25) hp = unit.getProperty('hitPoints') self.assertEqual(hp, 25) pass