a31a3a9fd5
Improves coverage because it tests the case where the arg does not have a __len__ slot.
14 lines
236 B
Python
14 lines
236 B
Python
d = dict.fromkeys([1, 2, 3, 4])
|
|
l = list(d.keys())
|
|
l.sort()
|
|
print(l)
|
|
|
|
d = dict.fromkeys([1, 2, 3, 4], 42)
|
|
l = list(d.values())
|
|
l.sort()
|
|
print(l)
|
|
|
|
# argument to fromkeys is a generator
|
|
d = dict.fromkeys(i + 1 for i in range(1))
|
|
print(d)
|