summaryrefslogtreecommitdiffstatshomepage
path: root/tests/basics/with-break.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/basics/with-break.py')
-rw-r--r--tests/basics/with-break.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/basics/with-break.py b/tests/basics/with-break.py
new file mode 100644
index 0000000000..f1063d5826
--- /dev/null
+++ b/tests/basics/with-break.py
@@ -0,0 +1,14 @@
+class CtxMgr:
+
+ def __enter__(self):
+ print("__enter__")
+ return self
+
+ def __exit__(self, a, b, c):
+ print("__exit__", repr(a), repr(b))
+
+for i in range(5):
+ print(i)
+ with CtxMgr():
+ if i == 3:
+ break