diff options
author | Damien George <damien.p.george@gmail.com> | 2017-01-19 23:38:53 +1100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2017-01-19 23:38:53 +1100 |
commit | 7314ebae8a3c7fae2c61427d428593ce84b4ccb5 (patch) | |
tree | 13e5f6c7836c7516b942c28fd2caadc29b5da0e6 /tests/misc/non_compliant.py | |
parent | fb5838041b2349c7df5b2f90317b6cc7ec657f84 (diff) | |
download | micropython-7314ebae8a3c7fae2c61427d428593ce84b4ccb5.tar.gz micropython-7314ebae8a3c7fae2c61427d428593ce84b4ccb5.zip |
tests/misc/non_compliant: Add test for inability to assign func attrs.
Diffstat (limited to 'tests/misc/non_compliant.py')
-rw-r--r-- | tests/misc/non_compliant.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/misc/non_compliant.py b/tests/misc/non_compliant.py index e8ec74b5d7..8e5d586a9e 100644 --- a/tests/misc/non_compliant.py +++ b/tests/misc/non_compliant.py @@ -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') |