ChrisCScott / forecaster

A personal finances forecasting tool for Canadian retirement planning
Other
1 stars 2 forks source link

TestForecast fails after extending `Debt` class #47

Closed ChrisCScott closed 6 years ago

ChrisCScott commented 6 years ago

Following the changes resolving #36, TestForecast fails on three tests. Output is below:

======================================================================
FAIL: test_manual_forecast (tests.test_forecast.TestForecast)
Test with one account, one debt, and constant Scenario.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/christopher/Documents/GitHub/forecaster/tests/test_forecast.py", line 143, in test_manual_forecast
    Money(48000))
AssertionError: <Money: 50000 CAD> != <Money: 48000 CAD>
======================================================================
FAIL: test_record_contribution_reduc (tests.test_forecast.TestForecast)
Test contribution reductions.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/christopher/Documents/GitHub/forecaster/tests/test_forecast.py", line 416, in test_record_contribution_reduc
    Money(250))
AssertionError: <Money: 0 CAD> != <Money: 250 CAD>
======================================================================
FAIL: test_record_net_contributions (tests.test_forecast.TestForecast)
Test net contributions.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/christopher/Documents/GitHub/forecaster/tests/test_forecast.py", line 483, in test_record_net_contributions
    Money(800))
AssertionError: <Money: 1000 CAD> != <Money: 800 CAD>

This needs to be investigated and resolved. It's unlikely this behaviour is correct, since none of these tests use non-default values for the new Debt class properties or methods (and so should be returning the same values as before).