From 8212773adb69309639833395bae8df487bd15c66 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Mon, 14 Nov 2016 00:27:35 +0300 Subject: [PATCH] tests: Use read() instead of readall(). --- tests/io/file1.py | 2 +- tests/wipy/os.py | 4 ++-- tests/wipy/uart.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/io/file1.py b/tests/io/file1.py index 8f9e4ef6e0..af4176b64e 100644 --- a/tests/io/file1.py +++ b/tests/io/file1.py @@ -37,7 +37,7 @@ except OSError: print('OSError') f.close() -# readall() error (call read() for compat with CPy) +# read() w/o args error f = open('io/data/file1', 'ab') try: f.read() diff --git a/tests/wipy/os.py b/tests/wipy/os.py index f81d1cee8a..0596a16b52 100644 --- a/tests/wipy/os.py +++ b/tests/wipy/os.py @@ -38,7 +38,7 @@ n_w = f.write(test_bytes) print(n_w == len(test_bytes)) f.close() f = open('test.txt', 'r') -r = bytes(f.readall(), 'ascii') +r = bytes(f.read(), 'ascii') # check that we can write and read it correctly print(r == test_bytes) f.close() @@ -65,7 +65,7 @@ n_w = f.write(test_bytes) print(n_w == len(test_bytes)) f.close() f = open('test.txt', 'r') -r = bytes(f.readall(), 'ascii') +r = bytes(f.read(), 'ascii') # check that we can write and read it correctly print(r == test_bytes) f.close() diff --git a/tests/wipy/uart.py b/tests/wipy/uart.py index 5a5221e557..a3a1c14e88 100644 --- a/tests/wipy/uart.py +++ b/tests/wipy/uart.py @@ -72,7 +72,7 @@ print(uart1.readline() == b'1234567890') print(uart1.any() == 0) uart0.write(b'1234567890') -print(uart1.readall() == b'1234567890') +print(uart1.read() == b'1234567890') # tx only mode uart0 = UART(0, 1000000, pins=('GP12', None))