Budget App Confusion

I passed the challenge even though one of the tests (test_create_spend_chart) fails. I can’t figure out the problem with the formatting, but when I ran the code in the challenge solution link, it passed…What’s up?

Your project link(s)

solution: https://replit.com/@CarolMurphy/boilerplate-budget-app#test_module.py

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36

Challenge: Budget App

Link to the challenge:

For python projects, project page doesn’t run tests. It’s expected to submit projects, after all tests passes from the tests file.

As for the chart, I haven’t looked too close, but there seem to be something not right with calculating percents. The example run from main.py has 100% for Food, while other categories also had withdrawals. Similarly the case from the tests, first category has incorrectly 100%.

Here is the auto-highlighting of the error:

- 100|     
+ 100|          
?          +++++
-  90|     
+  90|          
?          +++++
-  80|     
+  80|          
?          +++++
-  70|     
+  70|    o     
?         +++++
-  60|     
+  60|    o     
?         +++++
-  50|     
+  50|    o     
?         +++++
-  40|     
+  40|    o     
?         +++++
-  30|     
+  30|    o     
?         +++++
-  20|     
+  20|    o  o  
?         +++++
-  10| o   
+  10|    o  o  
?      +++   ++
-   0| o   
+   0| o  o  o  
?         +++++

So it’s a bit hard to read. The test-case uses first the actual chart (-), then the expected chart (+) and points out differences with (?).
First up looks like you are missing spaces, propably forgot to add " " if there is no “o”.
Second is… dunno looks like your chart only contains a bar for “business” while the other two are at 0. The markers can be a bit irritating here it seems, but it’s actually easy to see that the red-marked chart contains only two points which doesn’t exactly add up to 100% :wink:

Thanks guys! I couldn’t figure out why a failed would let me pass, now I know why. And it was a spacing issue that took me forever to resolve, but I found it. Reading the “hint” given by the test suite is a skill I need to develop further. I actually went in and tried changing the expected string in the test suite to get it to pass before the light bulb went off. Well, on, actually.