mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 03:20:18 +00:00
14 lines
226 B
Python
14 lines
226 B
Python
import traceback
|
|
|
|
try:
|
|
a = {'123': 4}
|
|
b = a[6]
|
|
except KeyError:
|
|
s = traceback.format_exc()
|
|
|
|
ok = s == '''Traceback (most recent call last):
|
|
File "80_traceback.py", line 5
|
|
b = a[6]
|
|
KeyError: 6'''
|
|
|
|
assert ok, s |