Add testcase for failing namespace switch throwing exception from a module.

Issue #290. This currently fails, to draw attention to the issue.
This commit is contained in:
Paul Sokolovsky 2014-02-15 12:28:24 +02:00
parent 9307ef46ca
commit 8ac72b9d00
2 changed files with 18 additions and 0 deletions

View File

@ -1 +1,4 @@
var = 123 var = 123
def throw():
raise ValueError

View File

@ -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()