Пример #1
0
class takeCrit(unittest.TestCase):
    """ Test that takeCrit operates correctly """
    
    def setUp(self):
        """ Builds the ability for use in the tests """
        self.ability = NoCritAbility("")
        
    def alwaysReturns1(self):
        """ Check gaurded stat is the only protected stat """
        newMod, messages = self.ability.takeCrit(2, None, None)
        
        assert newMod == 1, "Mod should always be one."
        assert len(messages) == 0, "Should have no messages"
Пример #2
0
 def setUp(self):
     """ Builds the ability for use in the tests """
     self.ability = NoCritAbility("")