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:
parent
9307ef46ca
commit
8ac72b9d00
@ -1 +1,4 @@
|
|||||||
var = 123
|
var = 123
|
||||||
|
|
||||||
|
def throw():
|
||||||
|
raise ValueError
|
||||||
|
15
tests/basics/try-module.py
Normal file
15
tests/basics/try-module.py
Normal 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()
|
Loading…
Reference in New Issue
Block a user