Details
-
Bug
-
Resolution: Incomplete
-
P3: Somewhat important
-
None
-
5.9
-
Linux 4.14.13-1-ARCH
Python 3.6.4
Qt 5.9
PySide 5.9
Description
The qfile_test fails frequently because of an error on testBasic(self),
in the second assert self.assertFalse(obj.getChar()[0]):
_
63: Traceback (most recent call last):
63: File "/home/crmaurei/dev/pyside5.9/sources/pyside2/tests/QtCore/qfile_test.py", line 72, in testBasic
63: self.assertFalse(obj.getChar()[0])
63: UnicodeDecodeError: 'utf-8' codec can't decode byte 0x85 in position 0: invalid start byte
_
The current version of the test uses a function to encode the bytes in UTF8 which is defined in sources/pyside2/tests/util/py3xfunctions.py, but using a simple b'a' instead
also produces the error.
When using:
_
obj = QFile(self.filename)
obj.open(QIODevice.ReadOnly)
print(obj.readAll())
_
there is no decoding problem.
I tried writing the file with Python files instead of os.write() but the problem persisted.
Also I tried changing the encoding, but I didn't succeed.
An example temporary file that was written with the test is attached: tmpc8s71kox
Can someone else confirm it?