Disable more tests in Python2.6, because of set literals that don't exist there.

This commit is contained in:
Dave Halter
2017-09-03 02:01:43 +02:00
parent 957f2cedf4
commit ef89593896
4 changed files with 49 additions and 36 deletions

View File

@@ -48,18 +48,6 @@ for a in arr:
#? float() str()
list(arr)[10]
# -----------------
# set.add
# -----------------
st = {1.0}
for a in [1,2]:
st.add(a)
st.append('') # lists should not have an influence
st.add # should not cause an exception
st.add()
# -----------------
# list.extend / set.update
# -----------------
@@ -103,15 +91,6 @@ arr2.append('')
arr2[0]
st = {1.0}
st.add(1)
lst = list(st)
lst.append('')
#? float() int() str()
lst[0]
lst = [1]
lst.append(1.0)
s = set(lst)
@@ -304,3 +283,28 @@ def third():
return list(b)
#?
third()[0]
# -----------------
# set.add
# -----------------
# Set literals are not valid in 2.6.
# python >= 2.7
st = {1.0}
for a in [1,2]:
st.add(a)
st.append('') # lists should not have an influence
st.add # should not cause an exception
st.add()
st = {1.0}
st.add(1)
lst = list(st)
lst.append('')
#? float() int() str()
lst[0]