aboutsummaryrefslogtreecommitdiff
path: root/tests/thread/thread_exc2.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/thread/thread_exc2.py')
-rw-r--r--tests/thread/thread_exc2.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/thread/thread_exc2.py b/tests/thread/thread_exc2.py
new file mode 100644
index 000000000..35cb32441
--- /dev/null
+++ b/tests/thread/thread_exc2.py
@@ -0,0 +1,10 @@
+# test raising exception within thread which is not caught
+import utime
+import _thread
+
+def thread_entry():
+ raise ValueError
+
+_thread.start_new_thread(thread_entry, ())
+utime.sleep(1)
+print('done')