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