========================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================= test session starts ==========================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================
platform linux -- Python 3.10.12, pytest-9.0.3, pluggy-1.6.0 -- /usr/bin/python3
cachedir: .pytest_cache
metadata: {'Python': '3.10.12', 'Platform': 'Linux-6.8.0-1025-gke-x86_64-with-glibc2.35', 'Packages': {'pytest': '9.0.3', 'pluggy': '1.6.0'}, 'Plugins': {'anyio': '4.13.0', 'metadata': '3.1.1', 'json-report': '1.5.0', 'cov': '7.1.0'}}
rootdir: /workspace/chardet
configfile: setup.cfg
plugins: anyio-4.13.0, metadata-3.1.1, json-report-1.5.0, cov-7.1.0
collected 381 items

test.py::test_encoding_detection[tests/iso-8859-7-greek/disabled.gr.xml-iso-8859-7] XPASS                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        [  0%]
test.py::test_encoding_detection[tests/iso-8859-7-greek/naftemporiki.gr.cmm.xml-iso-8859-7] PASSED                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               [  0%]
test.py::test_encoding_detection[tests/iso-8859-7-greek/_ude_1.txt-iso-8859-7] FAILED                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            [  0%]
test.py::test_encoding_detection[tests/iso-8859-7-greek/naftemporiki.gr.spo.xml-iso-8859-7] PASSED                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               [  1%]
test.py::test_encoding_detection[tests/iso-8859-7-greek/hotstation.gr.xml-iso-8859-7] PASSED                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     [  1%]
test.py::test_encoding_detection[tests/iso-8859-7-greek/naftemporiki.gr.fin.xml-iso-8859-7] PASSED                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               [  1%]
test.py::test_encoding_detection[tests/iso-8859-7-greek/naftemporiki.gr.wld.xml-iso-8859-7] PASSED                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               [  1%]
test.py::test_encoding_detection[tests/iso-8859-7-greek/_ude_3.txt-iso-8859-7] FAILED                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            [  2%]
test.py::test_encoding_detection[tests/iso-8859-7-greek/naftemporiki.gr.mrt.xml-iso-8859-7] PASSED                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               [  2%]
test.py::test_encoding_detection[tests/iso-8859-7-greek/_chromium_ISO-8859-7_with_no_encoding_specified.html-iso-8859-7] FAILED                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  [  2%]
test.py::test_encoding_detection[tests/iso-8859-7-greek/_ude_2.txt-iso-8859-7] FAILED                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            [  2%]
test.py::test_encoding_detection[tests/iso-8859-7-greek/naftemporiki.gr.bus.xml-iso-8859-7] PASSED                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               [  3%]
test.py::test_encoding_detection[tests/iso-8859-7-greek/_ude_greek.txt-iso-8859-7] FAILED                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        [  3%]
test.py::test_encoding_detection[tests/iso-8859-7-greek/naftemporiki.gr.mrk.xml-iso-8859-7] PASSED                                                                                                                                                                                                                                                                                                                                                                              <response clipped><NOTE>Due to the max output limit, only part of the full response has been shown to you.</NOTE>ept LookupError:
                expected_unicode = ""
            try:
                detected_unicode = input_bytes.decode(result["encoding"])
            except (LookupError, UnicodeDecodeError, TypeError):
                detected_unicode = ""
        if result:
            encoding_match = (result["encoding"] or "").lower() == encoding
        else:
            encoding_match = False
        # Only care about mismatches that would actually result in different
        # behavior when decoding
        if not encoding_match and expected_unicode != detected_unicode:
            wrapped_expected = "\n".join(textwrap.wrap(expected_unicode, 100)) + "\n"
            wrapped_detected = "\n".join(textwrap.wrap(detected_unicode, 100)) + "\n"
            diff = "".join(
                list(
                    ndiff(
                        wrapped_expected.splitlines(True), wrapped_detected.splitlines(True)
                    )
                )[:20]
            )
            all_encodings = chardet.detect_all(input_bytes, ignore_threshold=True)
        else:
            diff = ""
            encoding_match = True
            all_encodings = [result]
>       assert encoding_match, (
            f"Expected {encoding}, but got {result} for {file_name}.  First 20 "
            f"lines of character differences: \n{diff}\n"
            f"All encodings: {pformat(all_encodings)}"
        )
E       AssertionError: Expected euc-kr, but got {'encoding': 'x-euc-tw', 'confidence': 0.7, 'language': 'Chinese'} for tests/EUC-KR/_ude_euc2.txt.  First 20 lines of character differences:
E         +
E         - 북조선 사람들은 흔히 자국을 조선(朝鮮)이나 공화국(共和國)이라고 부른다. 지역적으로 한반도의 남쪽(대한민국)을 의미하는 남조선(南朝鮮)에 대응하여 북조선(北朝鮮)이라고도 부른다.
E         - 대한민국에서는 남·북의 대치 상황과 맞물려 공식 명칭인 '조선민주주의인민공화국'을 잘 사용하지 않는다. 한국 사람들은 대개 ‘북한(北韓)’이라고 부르며, 짧게 ‘북’으로 부를 때도
E         - 있다. 나이가 많은 세대에서는 간혹 ‘이북(以北)’이라는 표현을 쓰기도 하며, 제한적으로 '북조선'이라 부르기도 한다. 과거 대한민국 정부에서는 북조선(북한)을 옛 소련의
E         - 괴뢰정권으로 비하하는 ‘북괴(北傀)’로 비칭하였으나 관계 개선과 함께 잘 쓰이지 않게 되었다.[3] 간혹 일부 반공주의 보수단체들은 북괴라는 표현을 쓰기도 한다.  대한민국에서는
E         - 조선이나 북조선이란 표현을 기피하며[출처 필요], 조선은 조선 왕조나 단군조선 등을 가리키는 말로 쓴다. 남북간의 교류가 활성화되면서 특별한 색채가 없는 ‘북측’이나 ‘북쪽’이란
E         - 표현도 많이 쓰이고 있는 추세이다. 대한민국에서는 한국 전쟁 이전의 행정 구역인 평안남도·평안북도·함경남도·함경북도·황해도를 ‘이북 5도(以北五道)’라 부르기도 한다.  공식적인
E         - 영어 명칭은 DPRK(Democratic People's Republic of Korea)이며 보통 '조선반도(한반도) 북쪽'을 의미하는 North Korea라고 부른다.
E
E         All encodings: [{'confidence': 0.7, 'encoding': 'x-euc-tw', 'language': 'Chinese'}]
E       assert False

test.py:110: AssertionError
======================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================= short test summary info ========================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================
FAILED test.py::test_encoding_detection[tests/iso-8859-7-greek/_ude_1.txt-iso-8859-7] - AssertionError: Expected iso-8859-7, but got {'encoding': 'x-euc-tw', 'confidence': 0.7, 'language': 'Chinese'} for tests/iso-8859-7-greek/_ude_1.txt.  First 20 lines of character differences:
FAILED test.py::test_encoding_detection[tests/iso-8859-7-greek/_ude_3.txt-iso-8859-7] - AssertionError: Expected iso-8859-7, but got {'encoding': 'x-euc-tw', 'confidence': 0.7, 'language': 'Chinese'} for tests/iso-8859-7-greek/_ude_3.txt.  First 20 lines of character differences:
FAILED test.py::test_encoding_detection[tests/iso-8859-7-greek/_chromium_ISO-8859-7_with_no_encoding_specified.html-iso-8859-7] - AssertionError: Expected iso-8859-7, but got {'encoding': 'x-euc-tw', 'confidence': 0.7, 'language': 'Chinese'} for tests/iso-8859-7-greek/_chromium_ISO-8859-7_with_no_encoding_specified.html.  First 20 lines of character differences:
FAILED test.py::test_encoding_detection[tests/iso-8859-7-greek/_ude_2.txt-iso-8859-7] - AssertionError: Expected iso-8859-7, but got {'encoding': 'x-euc-tw', 'confidence': 0.7, 'language': 'Chinese'} for tests/iso-8859-7-greek/_ude_2.txt.  First 20 lines of character differences:
FAILED test.py::test_encoding_detection[tests/iso-8859-7-greek/_ude_greek.txt-iso-8859-7] - AssertionError: Expected iso-8859-7, but got {'encoding': 'x-euc-tw', 'confidence': 0.7, 'language': 'Chinese'} for tests/iso-8859-7-greek/_ude_greek.txt.  First 20 lines of character differences:
FAILED test.py::test_encoding_detection[tests/KOI8-R/_ude_1.txt-koi8-r] - AssertionError: Expected koi8-r, but got {'encoding': 'x-euc-tw', 'confidence': 0.7, 'language': 'Chinese'} for tests/KOI8-R/_ude_1.txt.  First 20 lines of character differences:
FAILED test.py::test_encoding_detection[tests/KOI8-R/_chromium_KOI8-R_with_no_encoding_specified.html-koi8-r] - AssertionError: Expected koi8-r, but got {'encoding': 'x-euc-tw', 'confidence': 0.7, 'language': 'Chinese'} for tests/KOI8-R/_chromium_KOI8-R_with_no_encoding_specified.html.  First 20 lines of character differences:
FAILED test.py::test_encoding_detection[tests/SHIFT_JIS/_chromium_Shift-JIS_with_no_encoding_specified.html-shift_jis] - AssertionError: Expected shift_jis, but got {'encoding': 'GB18030', 'confidence': 0.65, 'language': 'Chinese'} for tests/SHIFT_JIS/_chromium_Shift-JIS_with_no_encoding_specified.html.  First 20 lines of character differences:
FAILED test.py::test_encoding_detection[tests/CP949/ricanet.com.xml-cp949] - AssertionError: Expected cp949, but got {'encoding': 'EUC-KR', 'confidence': 0.99, 'language': ''} for tests/CP949/ricanet.com.xml.  First 20 lines of character differences:
FAILED test.py::test_encoding_detection[tests/windows-1255-hebrew/_ude_he3.txt-windows-1255] - AssertionError: Expected windows-1255, but got {'encoding': 'x-euc-tw', 'confidence': 0.7, 'language': 'Chinese'} for tests/windows-1255-hebrew/_ude_he3.txt.  First 20 lines of character differences:
FAILED test.py::test_encoding_detection[tests/windows-1255-hebrew/_chromium_windows-1255_with_no_encoding_specified.html-windows-1255] - AssertionError: Expected windows-1255, but got {'encoding': 'x-euc-tw', 'confidence': 0.7, 'language': 'Chinese'} for tests/windows-1255-hebrew/_chromium_windows-1255_with_no_encoding_specified.html.  First 20 lines of character differences:
FAILED test.py::test_encoding_detection[tests/windows-1255-hebrew/_ude_he2.txt-windows-1255] - AssertionError: Expected windows-1255, but got {'encoding': 'x-euc-tw', 'confidence': 0.7, 'language': 'Chinese'} for tests/windows-1255-hebrew/_ude_he2.txt.  First 20 lines of character differences:
FAILED test.py::test_encoding_detection[tests/windows-1255-hebrew/_chromium_ISO-8859-8_with_no_encoding_specified.html-windows-1255] - AssertionError: Expected windows-1255, but got {'encoding': 'x-euc-tw', 'confidence': 0.7, 'language': 'Chinese'} for tests/windows-1255-hebrew/_chromium_ISO-8859-8_with_no_encoding_specified.html.  First 20 lines of character differences:
FAILED test.py::test_encoding_detection[tests/windows-1255-hebrew/_ude_he1.txt-windows-1255] - AssertionError: Expected windows-1255, but got {'encoding': 'x-euc-tw', 'confidence': 0.7, 'language': 'Chinese'} for tests/windows-1255-hebrew/_ude_he1.txt.  First 20 lines of character differences:
FAILED test.py::test_encoding_detection[tests/EUC-JP/_mozilla_bug426271_text-euc-jp.html-euc-jp] - AssertionError: Expected euc-jp, but got {'encoding': 'x-euc-tw', 'confidence': 0.7, 'language': 'Chinese'} for tests/EUC-JP/_mozilla_bug426271_text-euc-jp.html.  First 20 lines of character differences:
FAILED test.py::test_encoding_detection[tests/EUC-JP/_ude_1.txt-euc-jp] - AssertionError: Expected euc-jp, but got {'encoding': 'x-euc-tw', 'confidence': 0.7, 'language': 'Chinese'} for tests/EUC-JP/_ude_1.txt.  First 20 lines of character differences:
FAILED test.py::test_encoding_detection[tests/EUC-JP/_mozilla_bug431054_text.html-euc-jp] - AssertionError: Expected euc-jp, but got {'encoding': 'Johab', 'confidence': 0.65, 'language': 'Korean'} for tests/EUC-JP/_mozilla_bug431054_text.html.  First 20 lines of character differences:
FAILED test.py::test_encoding_detection[tests/CP932/hardsoft.at.webry.info.xml-cp932] - AssertionError: Expected cp932, but got {'encoding': 'SHIFT_JIS', 'confidence': 0.99, 'language': ''} for tests/CP932/hardsoft.at.webry.info.xml.  First 20 lines of character differences:
FAILED test.py::test_encoding_detection[tests/CP932/y-moto.com.xml-cp932] - AssertionError: Expected cp932, but got {'encoding': 'SHIFT_JIS', 'confidence': 0.99, 'language': ''} for tests/CP932/y-moto.com.xml.  First 20 lines of character differences:
FAILED test.py::test_encoding_detection[tests/IBM855/_ude_1.txt-ibm855] - AssertionError: Expected ibm855, but got {'encoding': 'x-euc-tw', 'confidence': 0.7, 'language': 'Chinese'} for tests/IBM855/_ude_1.txt.  First 20 lines of character differences:
FAILED test.py::test_encoding_detection[tests/GB2312/_chromium_gb18030_with_no_encoding_specified.html.xml-gb2312] - AssertionError: Expected gb2312, but got {'encoding': 'x-euc-tw', 'confidence': 0.7, 'language': 'Chinese'} for tests/GB2312/_chromium_gb18030_with_no_encoding_specified.html.xml.  First 20 lines of character differences:
FAILED test.py::test_encoding_detection[tests/MacCyrillic/_ude_1.txt-maccyrillic] - AssertionError: Expected maccyrillic, but got {'encoding': 'x-euc-tw', 'confidence': 0.7, 'language': 'Chinese'} for tests/MacCyrillic/_ude_1.txt.  First 20 lines of character differences:
FAILED test.py::test_encoding_detection[tests/IBM866/_ude_1.txt-ibm866] - AssertionError: Expected ibm866, but got {'encoding': 'x-euc-tw', 'confidence': 0.7, 'language': 'Chinese'} for tests/IBM866/_ude_1.txt.  First 20 lines of character differences:
FAILED test.py::test_encoding_detection[tests/TIS-620/_mozilla_bug488426_text.html-tis-620] - AssertionError: Expected tis-620, but got {'encoding': 'x-euc-tw', 'confidence': 0.7, 'language': 'Chinese'} for tests/TIS-620/_mozilla_bug488426_text.html.  First 20 lines of character differences:
FAILED test.py::test_encoding_detection[tests/Big5/_ude_1.txt-big5] - AssertionError: Expected big5, but got {'encoding': 'x-euc-tw', 'confidence': 0.7, 'language': 'Chinese'} for tests/Big5/_ude_1.txt.  First 20 lines of character differences:
FAILED test.py::test_encoding_detection[tests/Big5/_chromium_Big5_with_no_encoding_specified.html-big5] - AssertionError: Expected big5, but got {'encoding': 'x-euc-tw', 'confidence': 0.7, 'language': 'Chinese'} for tests/Big5/_chromium_Big5_with_no_encoding_specified.html.  First 20 lines of character differences:
FAILED test.py::test_encoding_detection[tests/windows-1252/_mozilla_bug421271_text.html-windows-1252] - AssertionError: Expected windows-1252, but got {'encoding': 'SHIFT_JIS', 'confidence': 0.65, 'language': 'Japanese'} for tests/windows-1252/_mozilla_bug421271_text.html.  First 20 lines of character differences:
FAILED test.py::test_encoding_detection[tests/iso-8859-5-russian/_chromium_ISO-8859-5_with_no_encoding_specified.html-iso-8859-5] - AssertionError: Expected iso-8859-5, but got {'encoding': 'x-euc-tw', 'confidence': 0.7, 'language': 'Chinese'} for tests/iso-8859-5-russian/_chromium_ISO-8859-5_with_no_encoding_specified.html.  First 20 lines of character differences:
FAILED test.py::test_encoding_detection[tests/Johab/mdir-doc.txt-johab] - AssertionError: Expected johab, but got {'encoding': 'x-euc-tw', 'confidence': 0.7, 'language': 'Chinese'} for tests/Johab/mdir-doc.txt.  First 20 lines of character differences:
FAILED test.py::test_encoding_detection[tests/windows-1251-russian/_ude_1.txt-windows-1251] - AssertionError: Expected windows-1251, but got {'encoding': 'x-euc-tw', 'confidence': 0.7, 'language': 'Chinese'} for tests/windows-1251-russian/_ude_1.txt.  First 20 lines of character differences:
FAILED test.py::test_encoding_detection[tests/windows-1251-russian/_chromium_windows-1251_with_no_encoding_specified.html-windows-1251] - AssertionError: Expected windows-1251, but got {'encoding': 'x-euc-tw', 'confidence': 0.7, 'language': 'Chinese'} for tests/windows-1251-russian/_chromium_windows-1251_with_no_encoding_specified.html.  First 20 lines of character differences:
FAILED test.py::test_encoding_detection[tests/EUC-KR/_mozilla_bug9357_text.html-euc-kr] - AssertionError: Expected euc-kr, but got {'encoding': 'x-euc-tw', 'confidence': 0.7, 'language': 'Chinese'} for tests/EUC-KR/_mozilla_bug9357_text.html.  First 20 lines of character differences:
FAILED test.py::test_encoding_detection[tests/EUC-KR/_chromium_windows-949_with_no_encoding_specified.html-euc-kr] - AssertionError: Expected euc-kr, but got {'encoding': 'x-euc-tw', 'confidence': 0.7, 'language': 'Chinese'} for tests/EUC-KR/_chromium_windows-949_with_no_encoding_specified.html.  First 20 lines of character differences:
FAILED test.py::test_encoding_detection[tests/EUC-KR/_ude_euc1.txt-euc-kr] - AssertionError: Expected euc-kr, but got {'encoding': 'x-euc-tw', 'confidence': 0.7, 'language': 'Chinese'} for tests/EUC-KR/_ude_euc1.txt.  First 20 lines of character differences:
FAILED test.py::test_encoding_detection[tests/EUC-KR/_ude_euc2.txt-euc-kr] - AssertionError: Expected euc-kr, but got {'encoding': 'x-euc-tw', 'confidence': 0.7, 'language': 'Chinese'} for tests/EUC-KR/_ude_euc2.txt.  First 20 lines of character differences:
============================================================================================================================================================================================================================================================================================================================================================================================================================================================================================== 35 failed, 340 passed, 6 xpassed in 0.94s ===============================================================================================================================================================================================================================================================================================================================================================================================================================================================================================
[The command completed with exit code 1.]
[Current working directory: /workspace/chardet]
[Python interpreter: /usr/bin/python]
[Command finished with exit code 1]