tests: Add missing tests for builtins, and many other things.
This commit is contained in:
10
tests/basics/builtin_sorted.py
Normal file
10
tests/basics/builtin_sorted.py
Normal file
@@ -0,0 +1,10 @@
|
||||
# test builtin sorted
|
||||
|
||||
print(sorted(set(range(100))))
|
||||
print(sorted(set(range(100)), key=lambda x: x + 100*(x % 2)))
|
||||
|
||||
# need to use keyword argument
|
||||
try:
|
||||
sorted([], None)
|
||||
except TypeError:
|
||||
print("TypeError")
|
||||
Reference in New Issue
Block a user