Skip to content
Snippets Groups Projects
Commit 7314ebae authored by Damien George's avatar Damien George
Browse files

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

parent fb583804
Branches
Tags
No related merge requests found
...@@ -124,3 +124,11 @@ try: ...@@ -124,3 +124,11 @@ try:
bytearray(4)[0:1] = [1, 2] bytearray(4)[0:1] = [1, 2]
except NotImplementedError: except NotImplementedError:
print('NotImplementedError') print('NotImplementedError')
# can't assign attributes to a function
def f():
pass
try:
f.x = 1
except AttributeError:
print('AttributeError')
...@@ -19,3 +19,4 @@ NotImplementedError ...@@ -19,3 +19,4 @@ NotImplementedError
b'\x01\x02' b'\x01\x02'
b'\x01\x00' b'\x01\x00'
NotImplementedError NotImplementedError
AttributeError
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment