From 9fb36af9afd0671c4a0d1d29465449ec4d1440fe Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Mon, 29 Feb 2016 01:03:32 +0200 Subject: [PATCH] tests/vfs_fat_ramdisk: Allow to run in native mode (don't use "with"). --- tests/extmod/vfs_fat_ramdisk.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/extmod/vfs_fat_ramdisk.py b/tests/extmod/vfs_fat_ramdisk.py index 5cc6f325d3..c8b52dd3d1 100644 --- a/tests/extmod/vfs_fat_ramdisk.py +++ b/tests/extmod/vfs_fat_ramdisk.py @@ -63,7 +63,8 @@ assert vfs.listdir() == [] vfs.mkdir("foo_dir") assert vfs.listdir() == ['foo_dir'] -with vfs.open("foo_dir/file-in-dir.txt", "w") as f: - f.write("data in file") +f = vfs.open("foo_dir/file-in-dir.txt", "w") +f.write("data in file") +f.close() assert vfs.listdir("foo_dir") == ['file-in-dir.txt']