summaryrefslogtreecommitdiffstatshomepage
path: root/tests/unix/extra_coverage.py
diff options
context:
space:
mode:
authorRami Ali <flowergrass@users.noreply.github.com>2017-01-17 13:12:50 +1100
committerDamien George <damien.p.george@gmail.com>2017-01-17 13:27:02 +1100
commitcba723fc8c9b76150efc95e54996ad12a9a8cfc6 (patch)
treea8f23d19e69fa56a39b0124efb6430f34ee6decc /tests/unix/extra_coverage.py
parent96baaa68a4430efd585f2186976cfa473ca73bfc (diff)
downloadmicropython-cba723fc8c9b76150efc95e54996ad12a9a8cfc6.tar.gz
micropython-cba723fc8c9b76150efc95e54996ad12a9a8cfc6.zip
tests/io: Improve test coverage of io.BufferedWriter.
Diffstat (limited to 'tests/unix/extra_coverage.py')
-rw-r--r--tests/unix/extra_coverage.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/unix/extra_coverage.py b/tests/unix/extra_coverage.py
index 1c4cc6cf04..870e7d5f22 100644
--- a/tests/unix/extra_coverage.py
+++ b/tests/unix/extra_coverage.py
@@ -6,6 +6,7 @@ except NameError:
sys.exit()
import uerrno
+import uio
data = extra_coverage()
@@ -45,6 +46,11 @@ except OSError:
print('OSError')
print(stream2.read(1)) # read 1 byte encounters non-blocking error with textio stream
+# test BufferedWriter with stream errors
+stream.set_error(uerrno.EAGAIN)
+buf = uio.BufferedWriter(stream, 8)
+print(buf.write(bytearray(16)))
+
# test basic import of frozen scripts
import frzstr1
import frzmpy1