summaryrefslogtreecommitdiffstatshomepage
path: root/tests/misc/print_exception.py
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2016-02-13 17:55:26 +0200
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2016-03-07 14:10:06 +0700
commit419bb26ddc3017fb87cd9ce1853bc4f64f052394 (patch)
treebe13ded9b77cfa53c1ccee18809b913c539031dd /tests/misc/print_exception.py
parentd973c1bc124352aea5a2c0b86fc265ca404980d4 (diff)
downloadmicropython-419bb26ddc3017fb87cd9ce1853bc4f64f052394.tar.gz
micropython-419bb26ddc3017fb87cd9ce1853bc4f64f052394.zip
tests/print_exception: Use exception which prints the same regardless of config.
NameError may either include offending name or not. Unfortunately, this change makes test float-dependent. And using integer division leads to different error message than CPython.
Diffstat (limited to 'tests/misc/print_exception.py')
-rw-r--r--tests/misc/print_exception.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/misc/print_exception.py b/tests/misc/print_exception.py
index 92c9794e88..1d3ca4cf46 100644
--- a/tests/misc/print_exception.py
+++ b/tests/misc/print_exception.py
@@ -23,7 +23,7 @@ def print_exc(e):
# basic exception message
try:
- XXX
+ 1/0
except Exception as e:
print('caught')
print_exc(e)
@@ -32,7 +32,7 @@ except Exception as e:
def f():
g()
def g():
- YYY
+ 2/0
try:
f()
except Exception as e: