kopia lustrzana https://github.com/micropython/micropython
Add testcase for failing namespace switch throwing exception from a module.
Issue #290. This currently fails, to draw attention to the issue.pull/292/head
rodzic
9307ef46ca
commit
8ac72b9d00
|
@ -1 +1,4 @@
|
|||
var = 123
|
||||
|
||||
def throw():
|
||||
raise ValueError
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
# Regression test for #290 - throwing exception in another module led to
|
||||
# its namespace stick and namespace of current module not coming back.
|
||||
import import1b
|
||||
|
||||
def func1():
|
||||
return
|
||||
|
||||
def func2():
|
||||
try:
|
||||
import1b.throw()
|
||||
except ValueError:
|
||||
pass
|
||||
func1()
|
||||
|
||||
func2()
|
Ładowanie…
Reference in New Issue