summaryrefslogtreecommitdiffstatshomepage
path: root/tests/extmod/vfs_lfs_error.py
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2019-12-13 15:38:45 +1100
committerDamien George <damien.p.george@gmail.com>2019-12-13 15:59:08 +1100
commit7280bf40d9b43118cca87a7321c088e118a5ebc1 (patch)
tree5fd50cbe2af2692bf8790d3f1202adda7e6badf3 /tests/extmod/vfs_lfs_error.py
parent1098d1d630105cc64aae1175a6cc3f40054ba048 (diff)
downloadmicropython-7280bf40d9b43118cca87a7321c088e118a5ebc1.tar.gz
micropython-7280bf40d9b43118cca87a7321c088e118a5ebc1.zip
tests/extmod/vfs_lfs_error: Use small ints in seek error test.
So accessing the seek offset (at the C level) doesn't cause an OverflowError on 32-bit targets.
Diffstat (limited to 'tests/extmod/vfs_lfs_error.py')
-rw-r--r--tests/extmod/vfs_lfs_error.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/extmod/vfs_lfs_error.py b/tests/extmod/vfs_lfs_error.py
index b97fe6ec15..793fae59e2 100644
--- a/tests/extmod/vfs_lfs_error.py
+++ b/tests/extmod/vfs_lfs_error.py
@@ -106,8 +106,9 @@ def test(bdev, vfs_class):
# error during seek
with vfs.open('testfile', 'r') as f:
+ f.seek(1 << 30) # SEEK_SET
try:
- f.seek(1 << 31)
+ f.seek(1 << 30, 1) # SEEK_CUR
except OSError:
print('seek OSError')