tests/comprehension1, containment: Split set tests to separate files.

To make skippable.
pull/2799/merge
Paul Sokolovsky 2017-02-14 22:22:45 +03:00
rodzic ce2e0eeb7b
commit 800b163cd8
4 zmienionych plików z 8 dodań i 3 usunięć

Wyświetl plik

@ -14,7 +14,6 @@ def f():
print(d[0], d[1], d[2], d[3], d[4])
# set comprehension
print({a for a in range(5)})
# see set_comprehension.py
f()

Wyświetl plik

@ -1,5 +1,6 @@
# sets, see set_containment
for i in 1, 2:
for o in {1:2}, {1}, {1:2}.keys():
for o in {1:2}, {1:2}.keys():
print("{} in {}: {}".format(i, o, i in o))
print("{} not in {}: {}".format(i, o, i not in o))

Wyświetl plik

@ -0,0 +1 @@
print({a for a in range(5)})

Wyświetl plik

@ -0,0 +1,4 @@
for i in 1, 2:
for o in {}, {1}, {2}:
print("{} in {}: {}".format(i, o, i in o))
print("{} not in {}: {}".format(i, o, i not in o))