summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/micropython/builtin_execfile.py6
-rw-r--r--tests/micropython/builtin_execfile.py.exp1
2 files changed, 7 insertions, 0 deletions
diff --git a/tests/micropython/builtin_execfile.py b/tests/micropython/builtin_execfile.py
index 5a26ccf0a..9b6d6a0aa 100644
--- a/tests/micropython/builtin_execfile.py
+++ b/tests/micropython/builtin_execfile.py
@@ -70,5 +70,11 @@ except OSError:
# Test execfile with a file that does exist.
execfile("/test_mnt/test.py")
+# Test that it only works with string arguments.
+try:
+ execfile(b"aaa")
+except TypeError:
+ print("TypeError")
+
# Unmount the VFS object.
os.umount(fs)
diff --git a/tests/micropython/builtin_execfile.py.exp b/tests/micropython/builtin_execfile.py.exp
index 1d5d8ee57..49703d570 100644
--- a/tests/micropython/builtin_execfile.py.exp
+++ b/tests/micropython/builtin_execfile.py.exp
@@ -3,4 +3,5 @@ open /noexist.py rb
OSError
open /test.py rb
123
+TypeError
umount