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.
This commit is contained in:
Damien George 2016-11-26 15:38:48 +11:00
parent f8b71aabb4
commit a31a3a9fd5
1 changed files with 3 additions and 0 deletions

View File

@ -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)