Commits

masklinn committed ffba2df

Add some examples of conservation of the MRO order

Comments (0)

Files changed (1)

     >>> A().is_root_child() and B().is_root_child()
     True
 
+The original classes are not modified at any point, so we can check
+their MRO::
+
+    >>> A.mro() == [A, Root, extends.Base, object]
+    True
+
+and that its orderings hold::
+
+    >>> mro = type(A()).mro()
+    >>> mro.index(A) < mro.index(Root)
+    True
+    >>> mro.index(Root) < mro.index(extends.Base)
+    True
+
 Advanced topics in extends: Configuring extends behavior
 ========================================================