tests/basics: Add test for dict.fromkeys where arg is a generator.

Improves coverage because it tests the case where the arg does not have a
__len__ slot.
pull/2562/merge
Damien George 2016-11-26 15:38:48 +11:00
rodzic f8b71aabb4
commit a31a3a9fd5
1 zmienionych plików z 3 dodań i 0 usunięć

Wyświetl plik

@ -8,3 +8,6 @@ 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)