Пример #1
0
    def testPropertyNonExist(self):
        unit = Unit(1)

        with self.assertRaises(RuntimeError):
            str = unit.getProperty('strength')
            
        pass
Пример #2
0
    def testProperty(self):
        unit = Unit(1)
        unit.setProperty('hitPoints', 25)

        hp = unit.getProperty('hitPoints')
        self.assertEqual(hp, 25)

        pass