[Mecha Munch Management]: Modified Test Error Messages & Fixed Ordering Tests #3546
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Given the modifications to the runner that remove the test data from the subtests headlines in the UI, the error messages for failed tests and subtests needed modification. New error messages now include the function with the arguments it is called with, in addition to the actual result and the expected result.
Also discovered errors in the test data and methodology for two tests:
test_send_to_store()
andtest_sort_entries()
Because
dicts
are hashmaps, two will compare equal if they have the same keys and values even if those appear in a different order. While insertion order is guaranteed for dictionaries in Python, that ordering is not used for equality tests. 😱 so these tests were always passing....To fix this issue, the assert check now converts the input and expected
dicts
intoOrderedDicts
(where order does matter for equality).Additionally, multiple result_data
dicts
were not actually in sorted order, so that has also been corrected.Sadly, this will mean a requeue/retest of student solutions for this exercise.