Skip to content

Commit 36c6d2f

Browse files
committed
tests/builtin_minmax: Add testcase for lazy iterable (generator).
1 parent e23d5a6 commit 36c6d2f

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

tests/basics/builtin_minmax.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,5 @@
3535
print(min([], default=-1))
3636
print(max([1, 2, 3, 4, 5], default=-1))
3737
print(max([], default=-1))
38+
# Make sure it works with lazy iterables
39+
print(min((i for i in []), default=-10))

0 commit comments

Comments
 (0)