Skip to content

Commit

Permalink
Expand test to show that the result includes the values from the iter…
Browse files Browse the repository at this point in the history
…able.
  • Loading branch information
jaraco committed Feb 6, 2022
1 parent 68dd080 commit dbbf34e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion jaraco/itertools.py
Original file line number Diff line number Diff line change
Expand Up @@ -1167,7 +1167,8 @@ def ensure_unique(iterable, key=lambda x: x):
"""
Wrap an iterable to raise a ValueError if non-unique values are encountered.
>>> consume(ensure_unique('abc'))
>>> list(ensure_unique('abc'))
['a, 'b', 'c']
>>> consume(ensure_unique('abca'))
Traceback (most recent call last):
...
Expand Down

0 comments on commit dbbf34e

Please sign in to comment.