Skip to content

Commit c11c611

Browse files
committed
check type signature of collecting to counter
1 parent 27d39a2 commit c11c611

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/__main__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,8 @@ def assert_raises(exc: type[BaseException], fun: Callable[[], object]) -> None:
142142
assert Stream("1a2b3c4d5e6f7g8h9").map(int).catch(ValueError).sum() == 45
143143
assert Stream("1a2b3c4d5e6f7g8h9").map(int).catch(Exception).sum() == 45
144144

145-
assert Stream("abbccc122333").collect(Counter) == {
145+
counted_letters: Counter[str] = Stream("abbccc122333").collect(Counter)
146+
assert counted_letters == {
146147
"a": 1,
147148
"b": 2,
148149
"c": 3,

0 commit comments

Comments
 (0)