docstr: Test PyUnicode_ReadChar()
docstr_tok: ["Test","PyUnicode_ReadChar","(",")"]
code: def test_readchar(self):
      """Test PyUnicode_ReadChar()"""
      from _testcapi import unicode_readchar as readchar
  
      for s in [
          "abc",
          "\xa1\xa2",
          "\u4f60\u597d",
          "a\U0001f600",
          "a\ud800b\udfffc",
          "\ud834\udd1e",
      ]:
          for i, c in enumerate(s):
              self.assertEqual(readchar(s, i), ord(c))
          self.assertRaises(IndexError, readchar, s, len(s))
          self.assertRaises(IndexError, readchar, s, PY_SSIZE_T_MAX)
          self.assertRaises(IndexError, readchar, s, -1)
          self.assertRaises(IndexError, readchar, s, PY_SSIZE_T_MIN)
  
      self.assertRaises(TypeError, readchar, b"abc", 0)
      self.assertRaises(TypeError, readchar, [], 0)
  
imports: import unittest
  import sys
  from test import support
  from test.support import import_helper
label_desc: Use image node_id 12 for calling the CAPITest obj's underlying member method code with example usage: obj.test_readchar() without return types