docstr: Test PyUnicode_FromString()
docstr_tok: ["Test","PyUnicode_FromString","(",")"]
code: def test_fromstring(self):
      """Test PyUnicode_FromString()"""
      from _testcapi import unicode_fromstring as fromstring
  
      self.assertEqual(fromstring(b"abc"), "abc")
      self.assertEqual(fromstring(b"\xc2\xa1\xc2\xa2"), "\xa1\xa2")
      self.assertEqual(fromstring(b"\xe4\xbd\xa0"), "\u4f60")
      self.assertEqual(fromstring(b"\xf0\x9f\x98\x80"), "\U0001f600")
      self.assertRaises(UnicodeDecodeError, fromstring, b"\xc2")
      self.assertRaises(UnicodeDecodeError, fromstring, b"\xa1")
      self.assertEqual(fromstring(b""), "")
  
imports: import unittest
  import sys
  from test import support
  from test.support import import_helper
label_desc: Use image node_id 8 for calling the CAPITest obj's underlying member method code with example usage: obj.test_fromstring() without return types