From 571295d090d1eec40b45a88c2c5f54ceaf3c4e15 Mon Sep 17 00:00:00 2001 From: Damien George Date: Mon, 30 Jul 2018 12:05:48 +1000 Subject: [PATCH] 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. --- tests/extmod/ujson_dump_iobase.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/extmod/ujson_dump_iobase.py b/tests/extmod/ujson_dump_iobase.py index d30d1b561e..51d507cd1a 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