def test_initialized_with_many_decimals_rounds_to_currency_precision(self): # Arrange, Act result1 = Money(1000.333, USD) result2 = Money(5005.556666, USD) # Assert assert "1_000.33 USD" == result1.to_str() assert "5_005.56 USD" == result2.to_str()
def test_initialized_with_many_decimals_rounds_to_currency_precision(self): # Arrange # Act result1 = Money(1000.333, USD) result2 = Money(5005.556666, USD) # Assert self.assertEqual("1,000.33 USD", result1.to_str()) self.assertEqual("5,005.56 USD", result2.to_str())