Hi, regarding the unittest for the boilerplate-demographic-data-analyzer (2nd challenge in the Data Analysis with Python course) I ran into an issue.
In test_module.py
the “expected” values that are sent to assertAlmostEqual()
are rounded to 1 decimal place, but assertAlmostEqual()
by default will check 7 decimal places.
This means that those who provide an answer accurate to 2 or more decimal places will potentially fail this test!
Nowhere in the Readme.md does it tell us to round to the nearest decimal place.
I suggest one of three options:
- Adjust the expected value(s) in test_module.py to be accurate up to 7 decimal places
- Send the
places=1
parameter to AssertAlmostEquals() - Edit Readme.md to instruct the student to round their answers to 1 decimal place.
Any thoughts?