Пример #1
0
def test_multiplication():
    five = Dollar(5)
    assert Dollar(10) == five.times(2)
    assert Dollar(15) == five.times(3)
Пример #2
0
def test_multiplication():
    five = Dollar(5)
    product = five.times(2)
    assert 10 == product.amount
    product = five.times(3)
    assert 15 == product.amount
Пример #3
0
def test_multiplication():
    five = Dollar(5)
    five.times(2)
    assert 10 == five.amount
Пример #4
0
 def test_multiplication(self):
     five = Dollar(5)
     product = five.times(2)
     self.assertEquals(10, product.amount)
     product = five.times(3)
     self.assertEquals(15, product.amount)
Пример #5
0
def test_multiplication():
    five = Dollar(5, "USD")
    assert Dollar(10, "USD") == five.times(2)
    assert Dollar(15, "USD") == five.times(3)