Add & update tests for with blocks handling exceptions
- exceptions_test: exceptions_test now succeeds, unless we're JITting. It fails due to a bug in llvm codegen having to do with definedness analysis; see comment in emitBBs in irgen.cpp. - with_{class,functiondef}, try_{class,def}: Expose the same JIT bug that occurs in exceptions_test. - try_return_finally: We used to flip an internal assert in compareKeyset when JITting this test, but it's fixed now. - file_closed: Files have a `closed' attribute in Python, but not yet in Pyston. - finally_except: Our CFG pass had some corner case bugs when nesting a try/finally inside a try/except. This checks they're fixed. - try_continue: The CFG pass has a bug in its syntax error reporting. - with_continue, try_continue: Checks that `with'/`try'/`finally' handle syntax errors properly. - with_ctxclass_instance_attrs: Checks that we're accessing context-manager attributes on the context-manager's class, not the instance, when we run a `with'. As it turns out, our AST interpreter has a bug in ClsAttribute (I think) which means that we don't. Our JIT works ok, though. - with_ctxclass_order_of_access: Checks that we're accessing context-manager attributes in the right order when we run a `with', which we are. - with_file: Our `file' object runtime previously didn't support `with' properly. This checks that files work with `with'.
Showing
test/tests/file_closed.py
0 → 100644
test/tests/finally_except.py
0 → 100644
test/tests/try_class.py
0 → 100644
test/tests/try_continue.py
0 → 100644
test/tests/try_def.py
0 → 100644
test/tests/with_class.py
0 → 100644
test/tests/with_continue.py
0 → 100644
test/tests/with_file.py
0 → 100644
Please register or sign in to comment