Skip to content

[Mecha Munch Management]: Modified Test Error Messages & Fixed Ordering Tests#3546

Merged
BethanyG merged 1 commit intoexercism:mainfrom
BethanyG:update-dict-methods-tests
Nov 7, 2023
Merged

[Mecha Munch Management]: Modified Test Error Messages & Fixed Ordering Tests#3546
BethanyG merged 1 commit intoexercism:mainfrom
BethanyG:update-dict-methods-tests

Conversation

@BethanyG
Copy link
Copy Markdown
Member

@BethanyG BethanyG commented Nov 6, 2023

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() and test_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 into OrderedDicts (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.

Copy link
Copy Markdown
Member

@iHiD iHiD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not reviewing the code, but happy for you to merge this and student's solutions should auto get re-tested

@BethanyG BethanyG merged commit 0d2c09b into exercism:main Nov 7, 2023
petrem pushed a commit to petrem/exercism--python that referenced this pull request Dec 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants