Author: Armin Rigo <[email protected]>
Branch:
Changeset: r94793:55061f499bd5
Date: 2018-07-01 22:39 +0200
http://bitbucket.org/pypy/pypy/changeset/55061f499bd5/
Log: add test that passes on pypy2 but not pypy3
diff --git a/pypy/interpreter/test/test_raise.py
b/pypy/interpreter/test/test_raise.py
--- a/pypy/interpreter/test/test_raise.py
+++ b/pypy/interpreter/test/test_raise.py
@@ -280,3 +280,15 @@
def __new__(cls, *args):
return object()
raises(TypeError, "raise MyException")
+
+ def test_with_exit_True(self):
+ class X:
+ def __enter__(self):
+ pass
+ def __exit__(self, *args):
+ return True
+ def g():
+ with X():
+ return 42
+ assert False, "unreachable"
+ assert g() == 42
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit