Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Improve tests
  • Loading branch information
heckad committed Jul 23, 2020
commit a5fd9292023fb756d520db58993a648a51ce5cbe
7 changes: 7 additions & 0 deletions Lib/test/test_contextlib_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,13 @@ async def woohoo(self, func, args, kwds):
@_async_test
async def test_recursive(self):
depth = 0
ncols = 0

@asynccontextmanager
async def woohoo():
nonlocal ncols
ncols += 1

nonlocal depth
before = depth
depth += 1
Expand All @@ -296,6 +301,8 @@ async def recursive():
await recursive()

await recursive()

self.assertEqual(ncols, 10)
self.assertEqual(depth, 0)


Expand Down