Make expected checks case-insensitive and normalize list/set elements #106
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.
Motivation
containsandequalscomparisons and to minor formatting differences in list/set elements.Description
_normalize_textand_normalize_stringsinexamples/demo_qa/runner.pyand updated_match_expectedto use them for comparisons.containschecks, comparenorm(expected) in norm(actual)by using_normalize_texton both sides.equalschecks, performnorm(expected) == norm(actual)and added support for list/tuple/set comparisons by normalizing elements and comparing lists or sets as appropriate while still reporting original strings inExpectedCheck.detail.examples/demo_qa/tests/test_demo_qa_runner.pycovering case-insensitivecontains, case-insensitiveequals, and normalized list comparisons (test_match_expected_contains_pass_and_fail,test_match_expected_equals_is_case_insensitive,test_match_expected_list_comparison_normalizes_elements).Testing
pytestrun in the rollout).test_match_expected_equals_is_case_insensitiveandtest_match_expected_list_comparison_normalizes_elementsinexamples/demo_qa/tests/test_demo_qa_runner.py.Codex Task