(root)/
Python-3.11.7/
Lib/
test/
test_codecencodings_hk.py
       1  #
       2  # test_codecencodings_hk.py
       3  #   Codec encoding tests for HongKong encodings.
       4  #
       5  
       6  from test import multibytecodec_support
       7  import unittest
       8  
       9  class ESC[4;38;5;81mTest_Big5HKSCS(ESC[4;38;5;149mmultibytecodec_supportESC[4;38;5;149m.ESC[4;38;5;149mTestBase, ESC[4;38;5;149munittestESC[4;38;5;149m.ESC[4;38;5;149mTestCase):
      10      encoding = 'big5hkscs'
      11      tstring = multibytecodec_support.load_teststring('big5hkscs')
      12      codectests = (
      13          # invalid bytes
      14          (b"abc\x80\x80\xc1\xc4", "strict",  None),
      15          (b"abc\xc8", "strict",  None),
      16          (b"abc\x80\x80\xc1\xc4", "replace", "abc\ufffd\ufffd\u8b10"),
      17          (b"abc\x80\x80\xc1\xc4\xc8", "replace", "abc\ufffd\ufffd\u8b10\ufffd"),
      18          (b"abc\x80\x80\xc1\xc4", "ignore",  "abc\u8b10"),
      19      )
      20  
      21  if __name__ == "__main__":
      22      unittest.main()