I am doing the Sea Level task, and I noticed some weird test fails, that do not make sense to me.
While its testing the data points plotted on the graph it asserts a difference between my plotted data points. My values are exact the same as in the test data, but the values that are checked lose in some cases precision. for example:
[1881.0, 0.220472441] <- this is the value from the testfile and also my result
[1881.0, 0.22047244100000002] <- this what its tested against which has lost in precision.
Should I artificially add digits? i don´t see how i can artificially lose precision that the test result data is asking for.
All i do is plot the data points so i can´t see what to fix here:
plt.scatter(data=df, x='Year', y='CSIRO Adjusted Sea Level')
Traceback (most recent call last): File "/home/runner/boilerplate-sea-level-predictor/test_module.py", line 30, in test_plot_data_points self.assertEqual(actual, expected, "Expected different data points in scatter plot.") AssertionError: Lists differ: [[188[26 chars]72441], [1882.0, -0.440944881], [1883.0, -0.23[2982 chars]951]] != [[188[26 chars]7244100000002], [1882.0, -0.440944881], [1883.[3226 chars]951]] First differing element 1: [1881.0, 0.220472441] [1881.0, 0.22047244100000002]