summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--tests/cpydiff/core_function_instancevar.py11
-rw-r--r--tests/cpydiff/core_function_userattr.py11
2 files changed, 11 insertions, 11 deletions
diff --git a/tests/cpydiff/core_function_instancevar.py b/tests/cpydiff/core_function_instancevar.py
deleted file mode 100644
index ab027b1662..0000000000
--- a/tests/cpydiff/core_function_instancevar.py
+++ /dev/null
@@ -1,11 +0,0 @@
-"""
-categories: Core,Functions
-description: Assign instance variable to function
-cause: Unknown
-workaround: Unknown
-"""
-def f():
- pass
-
-f.x = 0
-print(f.x)
diff --git a/tests/cpydiff/core_function_userattr.py b/tests/cpydiff/core_function_userattr.py
new file mode 100644
index 0000000000..2972939084
--- /dev/null
+++ b/tests/cpydiff/core_function_userattr.py
@@ -0,0 +1,11 @@
+"""
+categories: Core,Functions
+description: User-defined attributes for functions are not supported
+cause: MicroPython is highly optimized for memory usage.
+workaround: Use external dictionary, e.g. ``FUNC_X[f] = 0``.
+"""
+def f():
+ pass
+
+f.x = 0
+print(f.x)