def test_constitution_reduce(self): stats = Stats() stats._constitution = 5 stats._health = 5 self.assertEqual(4, stats.reduce_constitution(4)) self.assertEqual(1, stats._constitution) self.assertEqual(1, stats._health)
def test_health_increase(self): stats = Stats() stats._constitution = 10 stats._health = 5 self.assertEqual(2, stats.increase_health(2)) self.assertEqual(7, stats._health)
def test_constitution_min_cap(self): stats = Stats() stats._constitution = 5 self.assertEqual(5, stats.reduce_constitution(6)) self.assertEqual(0, stats._constitution) self.assertEqual(0, stats._health)
def test_constitution_increase(self): stats = Stats() stats._constitution = 5 self.assertEqual(6, stats.increase_constitution(6)) self.assertEqual(11, stats._constitution)