a 4êdg¶ã@sLddlZddlZdd„Ze e¡dZGdd„dejƒZedkrHe ¡dS)éNcCs$|dkr ddlm}t| ¡ƒSdS)NÚ testcodecr)r)ÚtestrÚtupleÚ getregentry)Úencodingr©rú2/usr/local/lib/python3.9/test/test_charmapcodec.pyÚcodec_search_functions  r rc@s,eZdZdd„Zdd„Zdd„Zdd„Zd S) ÚCharmapCodecTestcCs^| tdtƒd¡| tdtƒd¡| tdtƒd¡| tdtƒd¡| td tƒd ¡dS) NóabcÚabcsxdefZabcdefsdefxZdefabcsdxfZdabcfsdxfxZdabcfabc©Ú assertEqualÚstrÚ codecname©ÚselfrrrÚtest_constructorxs z"CharmapCodecTest.test_constructorxcCs^| d t¡d¡| d t¡d¡| d t¡d¡| d t¡d¡| d  t¡d ¡dS) Nr r ZxdefsabcdefZdefxsdefabcZdxfsdabcfZdxfxsdabcfabc)rÚencoderrrrrÚ test_encodex$s zCharmapCodecTest.test_encodexcCsL| tdtƒd¡| tdtƒd¡| tdtƒd¡| tdtƒd¡dS)NsydefÚdefsdefysdyfÚdfsdyfyr rrrrÚtest_constructory+sz"CharmapCodecTest.test_constructorycCs| ttdt¡dS)Nsabc)Z assertRaisesÚ UnicodeErrorrrrrrrÚtest_maptoundefined1sz$CharmapCodecTest.test_maptoundefinedN)Ú__name__Ú __module__Ú __qualname__rrrrrrrrr sr Ú__main__) ZunittestÚcodecsr ÚregisterrZTestCaser rÚmainrrrrÚ s