There are some bugs in my code:
https://replit.com/@ayratmsk/boilerplate-budget-app#budget.py
I don’t know what order has code from tests and yet struggling find my problems
======================================================================
FAIL: test_create_spend_chart (test_module.UnitTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/runner/boilerplate-budget-app/test_module.py", line 102, in test_create_spend_chart
self.assertEqual(actual, expected, 'Expected different chart representation. Check that all spacing is exact.')
AssertionError: 'Perc[34 chars] \n 90| \n 80| \n 70| [316 chars] t ' != 'Perc[34 chars] \n 90| \n 80| \n 70| [340 chars] t '
Percentage spent by category
- 100|
+ 100|
? +
- 90|
+ 90|
? +
- 80|
+ 80|
? +
- 70|
+ 70| o
? +
- 60| o
+ 60| o
? +
- 50| o
+ 50| o
? +
- 40| o
+ 40| o
? +
- 30| o
+ 30| o
? +
- 20| o o
+ 20| o o
? +
- 10| o o
+ 10| o o
? +
- 0| o o o
+ 0| o o o
? +
----------
- B F E
+ B F E
? +
- u o n
+ u o n
? +
- s o t
+ s o t
? +
- i d e
+ i d e
? +
- n r
+ n r
? +
- e t
+ e t
? +
- s a
+ s a
? +
- s i
+ s i
? +
- n
+ n
? +
- m
+ m
? +
- e
+ e
? +
- n
+ n
? +
- t + t ? +
: Expected different chart representation. Check that all spacing is exact.
======================================================================
FAIL: test_to_string (test_module.UnitTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/runner/boilerplate-budget-app/test_module.py", line 91, in test_to_string
self.assertEqual(actual, expected, 'Expected different string representation of object.')
AssertionError: '****[47 chars] 900\nmilk, cereal, eggs, bac -45.67\nT[40 chars]4.33' != '****[47 chars] 900.00\nmilk, cereal, eggs, bac -45.67\nT[40 chars]4.33'
*************Food*************
- deposit 900
? ---
+ deposit 900.00
? +++
milk, cereal, eggs, bac -45.67
- Transfer to Entertainme -20
? ---
+ Transfer to Entertainme -20.00
? +++
Total: 834.33 : Expected different string representation of object.
======================================================================
FAIL: test_transfer (test_module.UnitTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/runner/boilerplate-budget-app/test_module.py", line 59, in test_transfer
self.assertEqual(good_transfer, True, 'Expected `transfer` method to return `True`.')
AssertionError: None != True : Expected `transfer` method to return `True`.
======================================================================
FAIL: test_transfer_no_funds (test_module.UnitTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/runner/boilerplate-budget-app/test_module.py", line 83, in test_transfer_no_funds
self.assertEqual(good_transfer, False, 'Expected `transfer` method to return `False`.')
AssertionError: None != False : Expected `transfer` method to return `False`.
----------------------------------------------------------------------
Ran 11 tests in 0.017s