summaryrefslogtreecommitdiffstatshomepage
path: root/tests/basics/async_with.py
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2016-10-11 12:30:32 +1100
committerDamien George <damien.p.george@gmail.com>2016-10-11 12:30:32 +1100
commit5e22afce41de8c87071d8fc149a6ba3cd8762819 (patch)
treecc8960bfe8bb7949ad5dd6a099ae3e390cb58359 /tests/basics/async_with.py
parente49153fb98ade48395b80271093bd763e771b3da (diff)
downloadmicropython-5e22afce41de8c87071d8fc149a6ba3cd8762819.tar.gz
micropython-5e22afce41de8c87071d8fc149a6ba3cd8762819.zip
tests: Improve test coverage of py/compile.c.
Diffstat (limited to 'tests/basics/async_with.py')
-rw-r--r--tests/basics/async_with.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/basics/async_with.py b/tests/basics/async_with.py
index 9eccfd816c..5af0c5d955 100644
--- a/tests/basics/async_with.py
+++ b/tests/basics/async_with.py
@@ -3,6 +3,7 @@
class AContext:
async def __aenter__(self):
print('enter')
+ return 1
async def __aexit__(self, exc_type, exc, tb):
print('exit', exc_type, exc)
@@ -17,7 +18,8 @@ except StopIteration:
print('finished')
async def g():
- async with AContext():
+ async with AContext() as ac:
+ print(ac)
raise ValueError('error')
o = g()