class_docstr: Test equality and ordering comparisons for built-in types and
  user-defined classes that implement relevant combinations of rich
  comparison methods.
class_docstr_tok: ["Test","equality","and","ordering","comparisons","for","built-in","types","and","user-defined","classes","that","implement","relevant","combinations","of","rich","comparison","methods","."]
docstr: Compare same-class instances with comparison methods.
docstr_tok: ["Compare","same-class","instances","with","comparison","methods","."]
code: def test_comp_classes_same(self):
      """Compare same-class instances with comparison methods."""
  
      for cls in self.all_comp_classes:
          with self.subTest(cls):
              instances = self.create_sorted_instances(cls, (1, 2, 1))
  
              # Same object.
              self.assert_total_order(
                  instances[0], instances[0], 0, cls.meth, cls.meth
              )
  
              # Different objects, same value.
              self.assert_total_order(
                  instances[0], instances[2], 0, cls.meth, cls.meth
              )
  
              # Different objects, value ascending for ascending identities.
              self.assert_total_order(
                  instances[0], instances[1], -1, cls.meth, cls.meth
              )
  
              # different objects, value descending for ascending identities.
              # This is the interesting case to assert that order comparison
              # is performed based on the value and not based on the identity.
              self.assert_total_order(
                  instances[1], instances[2], +1, cls.meth, cls.meth
              )
  
imports: import unittest
  from test.support import ALWAYS_EQ
  from fractions import Fraction
  from decimal import Decimal
label_desc: Use image node_id 11 for calling the ComparisonFullTest obj's underlying member method code with example usage: obj.test_comp_classes_same() without return types