Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
8212773a
Commit
8212773a
authored
Nov 14, 2016
by
Paul Sokolovsky
Browse files
tests: Use read() instead of readall().
parent
00a9590e
Changes
3
Hide whitespace changes
Inline
Side-by-side
tests/io/file1.py
View file @
8212773a
...
...
@@ -37,7 +37,7 @@ except OSError:
print
(
'OSError'
)
f
.
close
()
# read
all() error (call read() for compat with CPy)
# read
() w/o args error
f
=
open
(
'io/data/file1'
,
'ab'
)
try
:
f
.
read
()
...
...
tests/wipy/os.py
View file @
8212773a
...
...
@@ -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
.
read
all
(),
'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
.
read
all
(),
'ascii'
)
r
=
bytes
(
f
.
read
(),
'ascii'
)
# check that we can write and read it correctly
print
(
r
==
test_bytes
)
f
.
close
()
...
...
tests/wipy/uart.py
View file @
8212773a
...
...
@@ -72,7 +72,7 @@ print(uart1.readline() == b'1234567890')
print
(
uart1
.
any
()
==
0
)
uart0
.
write
(
b
'1234567890'
)
print
(
uart1
.
read
all
()
==
b
'1234567890'
)
print
(
uart1
.
read
()
==
b
'1234567890'
)
# tx only mode
uart0
=
UART
(
0
,
1000000
,
pins
=
(
'GP12'
,
None
))
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment