tests/misc/non_compliant: Add test for inability to assign func attrs.

pull/2498/merge
Damien George 2017-01-19 23:38:53 +11:00
rodzic fb5838041b
commit 7314ebae8a
2 zmienionych plików z 9 dodań i 0 usunięć

Wyświetl plik

@ -124,3 +124,11 @@ try:
bytearray(4)[0:1] = [1, 2]
except NotImplementedError:
print('NotImplementedError')
# can't assign attributes to a function
def f():
pass
try:
f.x = 1
except AttributeError:
print('AttributeError')

Wyświetl plik

@ -19,3 +19,4 @@ NotImplementedError
b'\x01\x02'
b'\x01\x00'
NotImplementedError
AttributeError