Skip to content

test(evaluators): edge cases for Equals and NotEquals - #414

Open
Ankit-cs wants to merge 1 commit into
StackGuardian:mainfrom
Ankit-cs:test/equals-not-equals-edge-cases
Open

Ankit-cs wants to merge 1 commit into
StackGuardian:mainfrom
Ankit-cs:test/equals-not-equals-edge-cases

Conversation

@Ankit-cs

Copy link
Copy Markdown

Related to #406

Pull Request Template

Description

  • What changes are being made?

    • Added unit test coverage for the 5 requested edge cases in both tests/core/evaluators/test_equals.py and tests/core/evaluators/test_not_equals.py:
      1. Dicts with different key order ({"a": 1, "b": 2} vs {"b": 2, "a": 1})
      2. Nested lists ([[1, 2], [3, 4]] equal and [[1, 2]] vs [[1, 3]] unequal)
      3. "1" vs 1
      4. None vs None and None vs 1
      5. True vs 1
  • Verdict Note on True vs 1:

    • True == 1 evaluates to passed: True because in Python bool inherits from int. As noted in the issue, if strict type distinction between booleans and integers is desired, a follow-up PR can be opened to add type checking.
  • Which issues or tickets does this PR close or relate to?

Type of Change

  • Documentation / Tests update (non-breaking change which adds test coverage)

Checklist

  • Code has been linted.
  • Documentation has been updated (if needed).
  • Tests have been added or updated (if needed).
  • Any breaking changes have been communicated to the team.

Additional Information

  • All 5 edge cases tested and verified across both Equals and NotEquals evaluators with 100% passing tests.
  • Contains exactly 1 clean commit based off origin/main.

@Ankit-cs

Copy link
Copy Markdown
Author

looking for feedback @refeed

@Ankit-cs

Copy link
Copy Markdown
Author

Please look my pr for the above issue @refeed , @Akshat0694 , @arunim2405

This branch has not been deployed

No deployments
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.

test(evaluators): edge cases for Equals and NotEquals

1 participant