summaryrefslogtreecommitdiff
path: root/python/subunit/tests
diff options
context:
space:
mode:
authorStephen Finucane <stephenfin@redhat.com>2020-03-14 00:18:03 +0000
committerGitHub <noreply@github.com>2020-03-14 13:18:03 +1300
commit26d31fa7c34019fad9038addf8114bbb4b656c92 (patch)
treec91df8ee9c999aeb4c964c7ad4fd137e53aef6e2 /python/subunit/tests
parent8fb3e0c2848d4225a7d5e13f107564646d2f5cb6 (diff)
downloadsubunit-git-26d31fa7c34019fad9038addf8114bbb4b656c92.tar.gz
Correctly handle py3 RawIOBase read()
Python3's RawIOBase guarantees only one syscall per read() requiring a loop to accumulate the desired number of bytes or actually reach EOF. TextIOBase.read does issue multiple syscalls (it must to correctly decode partial unicode characters), but subunit unwraps that to get a binary stream, and at least some of the time the layering is io.TextIOBase(_io.FileIO), where _io.FileIO is a RawIOBase subclass rather than BufferedIOBase. Signed-off-by: Stephen Finucane <stephenfin@redhat.com> Partial-bug: #1813147
Diffstat (limited to 'python/subunit/tests')
0 files changed, 0 insertions, 0 deletions