ValvePython / vdf

📜 Package for working with Valve's text and binary KeyValue format
https://pypi.org/project/vdf/
MIT License
165 stars 30 forks source link

Test fails with new Python 3.11 #48

Closed tim77 closed 1 year ago

tim77 commented 1 year ago
=================================== FAILURES ===================================
__________________________ BinaryVDF.test_loads_utf16 __________________________
self = <tests.test_binary_vdf.BinaryVDF testMethod=test_loads_utf16>
    def test_loads_utf16(self):
>       self.assertEqual({'aaa': b'b\x00b\x00\xff\xffb\x00b\x00'.decode('utf-16le')}, vdf.binary_loads(b'\x05aaa\x00b\x00b\x00\xff\xffb\x00b\x00\x00\x00\x08'))
E       AssertionError: {'aaa': 'bb\uffffbb'} != {'aaa': '戀戀\uffff戀戀'}
E       - {'aaa': 'bb\uffffbb'}
E       ?          ^^      ^^
E       
E       + {'aaa': '戀戀\uffff戀戀'}
E       ?          ^^      ^^
tests/test_binary_vdf.py:188: AssertionError
=========================== short test summary info ============================
FAILED tests/test_binary_vdf.py::BinaryVDF::test_loads_utf16 - AssertionError...
========================= 1 failed, 98 passed in 0.17s =========================
tim77 commented 1 year ago

Apologize for duplicate of https://github.com/ValvePython/vdf/issues/33.