def testSubInt(self): # Test the subtraction of integers # Benign test of two pushes # Apply the subtraction Method # Check just the resultant subtraction value on the stack s = RPNCaculator() s.push(2) s.push(5) s.sub() self.assertEqual(str(s), '[-3*]') a = s.pop() self.assertEqual(a, -3)
def testSubInt(self): # Test the subtraction of integers # Benign test of two pushes # Apply the subtraction Method # Check just the resultant subtraction value on the stack s = RPNCaculator() s.push(2) s.push(5) s.sub() self.assertEqual(str(s),'[-3*]') a = s.pop() self.assertEqual(a,-3)