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.
pull/1/head
Damien George 2018-07-30 12:05:48 +10:00
parent 11a38d5dc5
commit 571295d090
1 changed files with 1 additions and 0 deletions

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