summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--tests/cpydiff/core_class_mro.py15
-rw-r--r--tests/cpydiff/core_mro.py15
2 files changed, 15 insertions, 15 deletions
diff --git a/tests/cpydiff/core_class_mro.py b/tests/cpydiff/core_class_mro.py
new file mode 100644
index 0000000000..99713e790c
--- /dev/null
+++ b/tests/cpydiff/core_class_mro.py
@@ -0,0 +1,15 @@
+"""
+categories: Core,Classes
+description: Method Resolution Order (MRO) is not compliant with CPython
+cause: Depth first non-exhaustive method resolution order
+workaround: Avoid complex class hierarchies with multiple inheritance and complex method overrides. Keep in mind that many languages don't support multiple inheritance at all.
+"""
+class Foo:
+ def __str__(self):
+ return "Foo"
+
+class C(tuple, Foo):
+ pass
+
+t = C((1, 2, 3))
+print(t)
diff --git a/tests/cpydiff/core_mro.py b/tests/cpydiff/core_mro.py
deleted file mode 100644
index 35b898b303..0000000000
--- a/tests/cpydiff/core_mro.py
+++ /dev/null
@@ -1,15 +0,0 @@
-"""
-categories: Core
-description: Method Resolution Order (MRO) is not compliant with CPython
-cause: Unknown
-workaround: Unknown
-"""
-class Foo:
- def __str__(self):
- return "Foo"
-
-class C(tuple, Foo):
- pass
-
-t = C((1, 2, 3))
-print(t)