summaryrefslogtreecommitdiffstatshomepage
path: root/tests/cpydiff/core_class_superproperty.py
diff options
context:
space:
mode:
authorRami Ali <flowergrass@users.noreply.github.com>2017-02-07 15:55:37 +1100
committerDamien George <damien.p.george@gmail.com>2017-02-20 16:50:34 +1100
commit86c7507233929366ff17c9666200a33123491a8e (patch)
tree5494a2e1b5ab454305dd658c27048bb1bab9a798 /tests/cpydiff/core_class_superproperty.py
parent89267886cc6d3889d35e29b3273164d713ac2347 (diff)
downloadmicropython-86c7507233929366ff17c9666200a33123491a8e.tar.gz
micropython-86c7507233929366ff17c9666200a33123491a8e.zip
tests/cpydiff: Add initial set of tests for uPy-CPython differences.
These tests are intended to fail, as they provide a programatic record of differences between uPy and CPython. They also contain a special comment at the start of the file which has meta-data describing the difference, including known causes and known workarounds.
Diffstat (limited to 'tests/cpydiff/core_class_superproperty.py')
-rw-r--r--tests/cpydiff/core_class_superproperty.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/cpydiff/core_class_superproperty.py b/tests/cpydiff/core_class_superproperty.py
new file mode 100644
index 0000000000..1ec210550e
--- /dev/null
+++ b/tests/cpydiff/core_class_superproperty.py
@@ -0,0 +1,18 @@
+"""
+categories: Core,Classes
+description: Calling super() getter property in subclass will return a property object, not the value
+cause: Unknown
+workaround: Unknown
+"""
+class A:
+ @property
+ def p(self):
+ return {"a":10}
+
+class AA(A):
+ @property
+ def p(self):
+ return super().p
+
+a = AA()
+print(a.p)