def test_multiplication(): five = Dollar(5) assert Dollar(10) == five.times(2) assert Dollar(15) == five.times(3)
def test_multiplication(): five = Dollar(5) product = five.times(2) assert 10 == product.amount product = five.times(3) assert 15 == product.amount
def test_equality(): assert Dollar(5) == Dollar(5) assert Dollar(5) != Dollar(6)
def main(): five = Dollar.Dollar(5) product = five.times(2) print(product.amount)
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)
def test_multiplication(): five = Dollar(5) five.times(2) assert 10 == five.amount
def test_multiplication(): five = Dollar(5, "USD") assert Dollar(10, "USD") == five.times(2) assert Dollar(15, "USD") == five.times(3)
def test_currency(): assert Dollar(5, "USD").currency is "USD" assert Franc(5, "CHF").currency is "CHF"
def test_equality(): assert (Dollar(5, "USD") == Dollar(5, "USD")) is True assert (Franc(5, "CHF") == Franc(5, "CHF")) is True assert (Money(5, "USD") == Money(5, "USD")) is True
def test_equality(): assert Dollar(5) == Dollar(5) assert Dollar(5) != Dollar(6) assert Franc(5) == Franc(5) assert Franc(5) != Franc(6)