Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
36c6d2fa
Commit
36c6d2fa
authored
Dec 07, 2015
by
Paul Sokolovsky
Browse files
tests/builtin_minmax: Add testcase for lazy iterable (generator).
parent
e23d5a64
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/basics/builtin_minmax.py
View file @
36c6d2fa
...
...
@@ -35,3 +35,5 @@ print(min([1, 2, 3, 4, 5], default=-1))
print
(
min
([],
default
=-
1
))
print
(
max
([
1
,
2
,
3
,
4
,
5
],
default
=-
1
))
print
(
max
([],
default
=-
1
))
# Make sure it works with lazy iterables
print
(
min
((
i
for
i
in
[]),
default
=-
10
))
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment