summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2017-01-20 13:17:22 +1100
committerDamien George <damien.p.george@gmail.com>2017-01-20 13:17:22 +1100
commit1639200e5700b1170a9d2312a32c7991ed5198b4 (patch)
tree7323af49c8765f38cdc1bff972d03592260931c0
parent4d1ba482f5067c541b76b18b97c9130f4d413d59 (diff)
downloadmicropython-1639200e5700b1170a9d2312a32c7991ed5198b4.tar.gz
micropython-1639200e5700b1170a9d2312a32c7991ed5198b4.zip
tests/basics: Add test for assignment of attribute to bound method.
-rw-r--r--tests/basics/boundmeth1.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/basics/boundmeth1.py b/tests/basics/boundmeth1.py
index a728872755..f483ba406d 100644
--- a/tests/basics/boundmeth1.py
+++ b/tests/basics/boundmeth1.py
@@ -22,3 +22,9 @@ print(m(1))
# bound method with lots of extra args
m = A().h
print(m(1, 2, 3, 4, 5, 6))
+
+# can't assign attributes to a bound method
+try:
+ A().f.x = 1
+except AttributeError:
+ print('AttributeError')