|
|
|
@ -9,6 +9,12 @@ try:
|
|
|
|
|
except SyntaxError:
|
|
|
|
|
print('SyntaxError')
|
|
|
|
|
|
|
|
|
|
# store to exception attribute is not allowed
|
|
|
|
|
try:
|
|
|
|
|
ValueError().x = 0
|
|
|
|
|
except AttributeError:
|
|
|
|
|
print('AttributeError')
|
|
|
|
|
|
|
|
|
|
# array deletion not implemented
|
|
|
|
|
try:
|
|
|
|
|
a = array.array('b', (1, 2, 3))
|
|
|
|
@ -23,6 +29,12 @@ try:
|
|
|
|
|
except NotImplementedError:
|
|
|
|
|
print('NotImplementedError')
|
|
|
|
|
|
|
|
|
|
# containment, looking for integer not implemented
|
|
|
|
|
try:
|
|
|
|
|
print(1 in array.array('B', b'12'))
|
|
|
|
|
except NotImplementedError:
|
|
|
|
|
print('NotImplementedError')
|
|
|
|
|
|
|
|
|
|
# should raise type error
|
|
|
|
|
try:
|
|
|
|
|
print(set('12') >= '1')
|
|
|
|
@ -65,6 +77,12 @@ try:
|
|
|
|
|
except NotImplementedError:
|
|
|
|
|
print('NotImplementedError')
|
|
|
|
|
|
|
|
|
|
# str subscr with step!=1 not implemented
|
|
|
|
|
try:
|
|
|
|
|
print('abc'[1:2:3])
|
|
|
|
|
except NotImplementedError:
|
|
|
|
|
print('NotImplementedError')
|
|
|
|
|
|
|
|
|
|
# bytes(...) with keywords not implemented
|
|
|
|
|
try:
|
|
|
|
|
bytes('abc', encoding='utf8')
|
|
|
|
|