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
Paul Sokolovsky 2014-02-15 12:28:24 +02:00
rodzic 9307ef46ca
commit 8ac72b9d00
2 zmienionych plików z 18 dodań i 0 usunięć

Wyświetl plik

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

Wyświetl plik

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