tests/extmod/ujson_dump_iobase.py: Return number of bytes written.
Otherwise returning None indicates that the write would block and nothing was actually written. Fixes issue #3990.
This commit is contained in:
parent
11a38d5dc5
commit
571295d090
@ -24,6 +24,7 @@ class S(io.IOBase):
|
|||||||
# uPy passes a bytearray, CPython passes a str
|
# uPy passes a bytearray, CPython passes a str
|
||||||
buf = str(buf, 'ascii')
|
buf = str(buf, 'ascii')
|
||||||
self.buf += buf
|
self.buf += buf
|
||||||
|
return len(buf)
|
||||||
|
|
||||||
|
|
||||||
# dump to the user stream
|
# dump to the user stream
|
||||||
|
Loading…
Reference in New Issue
Block a user