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:
Damien George 2018-07-30 12:05:48 +10:00
parent 11a38d5dc5
commit 571295d090

View File

@ -24,6 +24,7 @@ class S(io.IOBase):
# uPy passes a bytearray, CPython passes a str
buf = str(buf, 'ascii')
self.buf += buf
return len(buf)
# dump to the user stream