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

To make skippable.
This commit is contained in:
Paul Sokolovsky 2017-02-14 22:22:45 +03:00
parent ce2e0eeb7b
commit 800b163cd8
4 changed files with 8 additions and 3 deletions

View File

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

View File

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

View File

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

View File

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