docstr: Test PyUnicode_DecodeUnicodeEscape()
docstr_tok: ["Test","PyUnicode_DecodeUnicodeEscape","(",")"]
code: def test_decodeunicodeescape(self):
      """Test PyUnicode_DecodeUnicodeEscape()"""
      decodeunicodeescape = _testcapi.unicode_decodeunicodeescape
  
      self.assertEqual(decodeunicodeescape(b"abc"), "abc")
      self.assertEqual(
          decodeunicodeescape(rb"\t\n\r\x0b\x0c\x00\\"),
          "\t\n\r\v\f\0\\",
      )
      self.assertEqual(
          decodeunicodeescape(b"\t\n\r\x0b\x0c\x00"), "\t\n\r\v\f\0"
      )
      self.assertEqual(decodeunicodeescape(rb"\xa1\xa2"), "\xa1\xa2")
      self.assertEqual(decodeunicodeescape(b"\xa1\xa2"), "\xa1\xa2")
      self.assertEqual(
          decodeunicodeescape(rb"\u4f60\u597d"), "\u4f60\u597d"
      )
      self.assertEqual(
          decodeunicodeescape(rb"\U0001f600"), "\U0001f600"
      )
      with self.assertWarns(DeprecationWarning):
          self.assertEqual(decodeunicodeescape(rb"\z"), r"\z")
  
      for b in b"\\", rb"\xa", rb"\u4f6", rb"\U0001f60":
          self.assertRaises(UnicodeDecodeError, decodeunicodeescape, b)
          self.assertRaises(
              UnicodeDecodeError, decodeunicodeescape, b, "strict"
          )
      self.assertEqual(
          decodeunicodeescape(rb"x\U0001f60", "replace"), "x\ufffd"
      )
      self.assertEqual(
          decodeunicodeescape(rb"x\U0001f60y", "replace"), "x\ufffdy"
      )
  
      self.assertRaises(LookupError, decodeunicodeescape, b"\\", "foo")
  
imports: import unittest
  import sys
  from test.support import import_helper
label_desc: Use image node_id 19 for calling the CAPITest obj's underlying member method code with example usage: obj.test_decodeunicodeescape() without return types