diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-02-15 12:28:24 +0200 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-02-15 12:44:29 +0200 |
commit | 8ac72b9d000ecc48a2d558bdb7c73c7f98d4be62 (patch) | |
tree | c6da86562813aa1b38b5c3a571ffc11144dc02e8 /tests/basics/try-module.py | |
parent | 9307ef46cab5bebcf14440e8ced0787e355751e8 (diff) |
Add testcase for failing namespace switch throwing exception from a module.
Issue #290. This currently fails, to draw attention to the issue.
Diffstat (limited to 'tests/basics/try-module.py')
-rw-r--r-- | tests/basics/try-module.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/basics/try-module.py b/tests/basics/try-module.py new file mode 100644 index 000000000..e62df8487 --- /dev/null +++ b/tests/basics/try-module.py @@ -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() |