Exemple #1
0
 def test_subtract(self):
     self.assertEqual(2, subtract(5, 3))
 def test_subtract(self):
     result = subtract(2, 1)
     self.assertEqual(result, 1)
Exemple #3
0
def test_calculator_subtract_multiple_param():
    assert calculator.subtract(1, 2, 3, 4, 5) == -15
 def test_subtract(self):
     self.assertEqual(3, subtract(10, 7))
Exemple #5
0
def test_calculator_subtract_one_param():
    assert calculator.subtract(2) == -2
Exemple #6
0
def test_calculator_subtract_no_param():
    assert calculator.subtract() == 0
def test_subtract():
    """Test functionality of subtract."""
    assert subtract(5, 1) == 4
    assert subtract(3, 2) == 1
Exemple #8
0
 def test_subtraction(self):
     assert 2 == calculator.subtract(4, 2)
 def test_subtract(self):
     self.assertEqual(7, subtract(10, 3))
 def test_subtract(self):
     self.assertEqual(3, subtract(5,2))
 def test_subtract(self):
     self.assertEqual(9, subtract(15, 6))
def test_subtract_string():
    with pytest.raises(TypeError):
        subtract('string', 4)
def test_subtract():
    result = subtract(25, 5)
    assert result == 20