********************************************************************** File "gradeDistributionTest.py", line 2, in __main__ Failed example: gradeDistribution([17, 25, 33, 12, 10.0, 98, 88.5]) Expected: [1, 2, 1, 1, 0, 0, 0, 0, 1, 1] Got: [0, 3, 1, 1, 0, 0, 0, 0, 1, 1] ********************************************************************** File "gradeDistributionTest.py", line 4, in __main__ Failed example: gradeDistribution([10, 20, 30, 40, 80, 80.5, 100]) Expected: [1, 1, 1, 1, 0, 0, 0, 1, 1, 1] Got: [0, 1, 1, 1, 1, 0, 0, 0, 2, 0] ********************************************************************** File "gradeDistributionTest.py", line 10, in __main__ Failed example: gradeDistribution([90, 91, 0, 100]) Expected: [1, 0, 0, 0, 0, 0, 0, 0, 1, 2] Got: [1, 0, 0, 0, 0, 0, 0, 0, 0, 2] ********************************************************************** 1 items had failures: 3 of 5 in __main__ ***Test Failed*** 3 failures.
This output clearly shows that three out of the 5 tests failed. If you examine the first failue and compare what was "Expected" and what was "Got" you will see that the error was because 10.0 got included in the second range, rather than the first.
In the next day of two we plan on posting similar test files for Problems 1-3 in HW5. You should use these test files to test your functions. We plan on using these test files to automate, to a greater extent, the grading of your homeworks.