Browse Source

tests/dict_fromkeys: Split out skippable part.

pull/2945/head
Paul Sokolovsky 8 years ago
parent
commit
ce63a95a85
  1. 5
      tests/basics/dict_fromkeys.py
  2. 11
      tests/basics/dict_fromkeys2.py

5
tests/basics/dict_fromkeys.py

@ -7,8 +7,3 @@ d = dict.fromkeys([1, 2, 3, 4], 42)
l = list(d.values())
l.sort()
print(l)
# argument to fromkeys has no __len__
d = dict.fromkeys(reversed(range(1)))
#d = dict.fromkeys((x for x in range(1)))
print(d)

11
tests/basics/dict_fromkeys2.py

@ -0,0 +1,11 @@
try:
reversed
except:
import sys
print("SKIP")
sys.exit()
# argument to fromkeys has no __len__
d = dict.fromkeys(reversed(range(1)))
#d = dict.fromkeys((x for x in range(1)))
print(d)
Loading…
Cancel
Save