docstr: Test PyUnicode_RSplit()
docstr_tok: ["Test","PyUnicode_RSplit","(",")"]
code: def test_rsplit(self):
      """Test PyUnicode_RSplit()"""
      from _testcapi import unicode_rsplit as rsplit
  
      self.assertEqual(rsplit("a|b|c|d", "|"), ["a", "b", "c", "d"])
      self.assertEqual(rsplit("a|b|c|d", "|", 2), ["a|b", "c", "d"])
      self.assertEqual(
          rsplit("a|b|c|d", "|", PY_SSIZE_T_MAX), ["a", "b", "c", "d"]
      )
      self.assertEqual(rsplit("a|b|c|d", "|", -1), ["a", "b", "c", "d"])
      self.assertEqual(
          rsplit("a|b|c|d", "|", PY_SSIZE_T_MIN), ["a", "b", "c", "d"]
      )
      self.assertEqual(rsplit("a|b|c|d", "\u20ac"), ["a|b|c|d"])
      self.assertEqual(rsplit("a||b|c||d", "||"), ["a", "b|c", "d"])
      self.assertEqual(rsplit("а|б|в|г", "|"), ["а", "б", "в", "г"])
      self.assertEqual(
          rsplit("абабагаламага", "а"),
          ["", "б", "б", "г", "л", "м", "г", ""],
      )
      self.assertEqual(rsplit("aжbжcжd", "ж"), ["a", "b", "c", "d"])
      self.assertEqual(
          rsplit(" a\tb\nc\rd\ve\f", NULL), ["a", "b", "c", "d", "e"]
      )
      self.assertEqual(
          rsplit("a\x85b\xa0c\u1680d\u2000e", NULL),
          ["a", "b", "c", "d", "e"],
      )
  
      self.assertRaises(ValueError, rsplit, "a|b|c|d", "")
      self.assertRaises(TypeError, rsplit, "a|b|c|d", ord("|"))
      self.assertRaises(TypeError, rsplit, [], "|")
  
imports: import unittest
  import sys
  from test import support
  from test.support import import_helper
label_desc: Use image node_id 29 for calling the CAPITest obj's underlying member method code with example usage: obj.test_rsplit() without return types