docstr: Test PyUnicode_RPartition()
docstr_tok: ["Test","PyUnicode_RPartition","(",")"]
code: def test_rpartition(self):
      """Test PyUnicode_RPartition()"""
      from _testcapi import unicode_rpartition as rpartition
  
      self.assertEqual(rpartition("a|b|c", "|"), ("a|b", "|", "c"))
      self.assertEqual(rpartition("a||b||c", "||"), ("a||b", "||", "c"))
      self.assertEqual(rpartition("а|б|в", "|"), ("а|б", "|", "в"))
      self.assertEqual(rpartition("кабан", "а"), ("каб", "а", "н"))
      self.assertEqual(rpartition("aжbжc", "ж"), ("aжb", "ж", "c"))
  
      self.assertRaises(ValueError, rpartition, "a|b|c", "")
      self.assertRaises(TypeError, rpartition, b"a|b|c", "|")
      self.assertRaises(TypeError, rpartition, "a|b|c", b"|")
      self.assertRaises(TypeError, rpartition, "a|b|c", ord("|"))
      self.assertRaises(TypeError, rpartition, [], "|")
  
imports: import unittest
  import sys
  from test import support
  from test.support import import_helper
label_desc: Use image node_id 31 for calling the CAPITest obj's underlying member method code with example usage: obj.test_rpartition() without return types