mirror of
https://github.com/micropython/micropython.git
synced 2026-01-06 12:10:13 +01:00
tests/misc/non_compliant: Add test for inability to assign func attrs.
This commit is contained in:
@@ -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')
|
||||
|
||||
@@ -19,3 +19,4 @@ NotImplementedError
|
||||
b'\x01\x02'
|
||||
b'\x01\x00'
|
||||
NotImplementedError
|
||||
AttributeError
|
||||
|
||||
Reference in New Issue
Block a user