assertUnique might break for collections that are not integer-indexable
Open
bug
good first issue
- Dominant language
- Python
- Stars
- 155
- Forks
- 22
- PR merge metrics
- No merged PRs in 30d
Description
### Description
Since we use slice indexing, I think `assertUnique` will fail on collections which are not integer-indexable. Sets have this property, but sets already enforce uniqueness so that's not a real problem. [multisets](https://pypi.org/project/multiset/) may expose a problem here though?
Contributor guide
Research direction
Start by locating the assertUnique entry point and reviewing how it uses slice indexing. Reproduce the reported behavior with a non-integer-indexable collection such as the linked multisets package, then add a regression test if the failure is confirmed and verify the existing uniqueness checks still pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100