Skip to content

Commit 71c7c03

Browse files
committed
tools/mpremote/tests: Add test for RemoteFile.readline.
Signed-off-by: Damien George <[email protected]>
1 parent 86526e9 commit 71c7c03

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

tools/mpremote/tests/test_mount.sh

+4
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,7 @@ $MPREMOTE mount ${TMP} exec "import mount_package; mount_package.x(); mount_pack
2626
echo -----
2727
$MPREMOTE mount ${TMP} exec "open('test.txt', 'w').write('hello world\n')"
2828
cat "${TMP}/test.txt"
29+
30+
# Test RemoteFile.readline and RemoteFile.readlines methods.
31+
echo -----
32+
$MPREMOTE mount ${TMP} exec "print(open('test.txt').readlines())"

tools/mpremote/tests/test_mount.sh.exp

+3
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,6 @@ Local directory ${TMP} is mounted at /remote
55
-----
66
Local directory ${TMP} is mounted at /remote
77
hello world
8+
-----
9+
['hello world\n']
10+
Local directory ${TMP} is mounted at /remote

0 commit comments

Comments
 (0)