summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2018-07-30 12:05:48 +1000
committerDamien George <damien.p.george@gmail.com>2018-07-30 12:05:48 +1000
commit571295d090d1eec40b45a88c2c5f54ceaf3c4e15 (patch)
treeb8e3f4946401785547877b0071d62bc00be382d5
parent11a38d5dc5365c9fa1d3edc05f948e21293ce127 (diff)
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.
-rw-r--r--tests/extmod/ujson_dump_iobase.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/extmod/ujson_dump_iobase.py b/tests/extmod/ujson_dump_iobase.py
index d30d1b561..51d507cd1 100644
--- a/tests/extmod/ujson_dump_iobase.py
+++ b/tests/extmod/ujson_dump_iobase.py
@@ -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