My code:
['0.0', '0.0', '-0.0', '-0.0', '-0.1', '0.5', '-0.0', '0.1', '0.2', '0.3', '0.0', '0.0', '0.0', '0.0', '0.0', '-0.0', '0.2', '0.1', '0.0', '0.2', '0.1', '0.0', '0.1', '-0.0', '-0.0', '0.1', '0.0', '0.2', '0.0', '0.1', '-0.0', '-0.0', '0.1', '0.0', '0.1', '0.4', '-0.0', '-0.0', '0.3', '0.2', '0.1', '-0.0', '0.0', '0.0', '0.0', '0.0', '-0.0', '0.2', '0.1', '0.1', '0.0', '0.0', '0.0', '0.0', '0.3', '0.0', '-0.0', '0.0', '-0.0', '-0.0', '-0.0', '-0.0', '0.0', '-0.0', '0.0', '0.0', '0.0', '0.2', '0.0', '-0.0', '0.2', '0.1', '0.3', '0.2', '0.1', '-0.0', '-0.0', '-0.0', '0.0', '0.1', '-0.0', '-0.1', '0.5', '0.0', '0.2', '0.1', '0.1', '0.0', '0.0', '-0.0', '0.1']
F
======================================================================
FAIL: test_heat_map_values (test_module.HeatMapTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/runner/freecodecamp2/test_module.py", line 48, in test_heat_map_values
self.assertEqual(actual, expected, "Expected different values in heat map.")
AssertionError: Lists differ: ['0.0[14 chars]0', '-0.0', '-0.1', '0.5', '-0.0', '0.1', '0.2[593 chars]0.1'] != ['0.0[14 chars]0', '0.0', '-0.1', '0.5', '0.0', '0.1', '0.1',[593 chars]0.1']
First differing element 3:
'-0.0'
'0.0'
['0.0',
'0.0',
'-0.0',
- '-0.0',
? -
+ '0.0',
'-0.1',
'0.5',
- '-0.0',
? -
+ '0.0',
'0.1',
- '0.2',
? ^
+ '0.1',
? ^
'0.3',
'0.0',
'0.0',
'0.0',
'0.0',
'0.0',
- '-0.0',
? -
+ '0.0',
'0.2',
'0.1',
'0.0',
'0.2',
'0.1',
'0.0',
'0.1',
'-0.0',
- '-0.0',
? ^
+ '-0.1',
? ^
'0.1',
'0.0',
'0.2',
'0.0',
'0.1',
'-0.0',
'-0.0',
'0.1',
'0.0',
'0.1',
'0.4',
'-0.0',
'-0.0',
'0.3',
'0.2',
'0.1',
'-0.0',
'0.0',
'0.0',
- '0.0',
+ '-0.0',
? +
- '0.0',
+ '-0.0',
? +
'-0.0',
'0.2',
'0.1',
'0.1',
'0.0',
'0.0',
'0.0',
'0.0',
'0.3',
'0.0',
'-0.0',
'0.0',
'-0.0',
'-0.0',
'-0.0',
- '-0.0',
? -
+ '0.0',
'0.0',
'-0.0',
'0.0',
'0.0',
'0.0',
'0.2',
'0.0',
'-0.0',
'0.2',
'0.1',
'0.3',
'0.2',
'0.1',
'-0.0',
'-0.0',
'-0.0',
- '0.0',
+ '-0.0',
? +
'0.1',
- '-0.0',
'-0.1',
+ '-0.1',
- '0.5',
? ^
+ '0.7',
? ^
'0.0',
'0.2',
'0.1',
'0.1',
- '0.0',
+ '-0.0',
? +
'0.0',
'-0.0',
'0.1'] : Expected different values in heat map.
----------------------------------------------------------------------
Ran 4 tests in 16.495s
FAILED (failures=1)
I still have this mistake but I’m not understanding where I’m wrong. I noticed comparing my heatmap with that of the reposity on GitHub that some values are different but only those related to the ‘overweight’ and ‘height’ column and then zeros that should not be negative but I followed all the steps in my code.
Thanks for your help!