I just started 2nd Project for Data Science using python Certification, and forked the initial boilerplate from repl.it.
Here is the snippet from one of the test
def test_higher_education_rich(self):
actual = self.data['higher_education_rich']
expected = 46.5
self.assertAlmostEqual(actual, expected, "Expected different value for percentage with higher education that earn >50K.")
Third argument which is given as the positional argument(String for message if the test failed) is given as the positional argument.
below is self.assertAlmostEquals
from Documentation
assertAlmostEqual( *first* , *second* , *places=7* , *msg=None* , *delta=None* )
As the third argument in function declaration is places
, we’re just passing the string as it’s value and as a result, I’m having the errors such as following:
To fix this error, we just need to add the argument as msg="Expected different value for percentage....
"
On github, only link to the boilerplate for the challenge is given. Should I just change the link to my edited repl and pull request for the change or There’s another method for that?