Skip to content

Commit

Permalink
add testing of from contextlib import *
Browse files Browse the repository at this point in the history
  • Loading branch information
jakkdl committed May 27, 2024
1 parent fed22b4 commit 3021de5
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# ARG --enable=ASYNC910
# see exception_suppress_context_manager.py for main testing

# AUTOFIX
# ASYNCIO_NO_AUTOFIX

from contextlib import *

# NOTE: remove in #255
import trio


async def foo(): # ASYNC910: 0, "exit", Statement('function definition', lineno)
with suppress():
await foo()
await trio.lowlevel.checkpoint()
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
+++
@@ x,3 x,4 @@
async def foo(): # ASYNC910: 0, "exit", Statement('function definition', lineno)
with suppress():
await foo()
+ await trio.lowlevel.checkpoint()
15 changes: 15 additions & 0 deletions tests/eval_files/exception_suppress_context_manager_import_star.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# ARG --enable=ASYNC910
# see exception_suppress_context_manager.py for main testing

# AUTOFIX
# ASYNCIO_NO_AUTOFIX

from contextlib import *

# NOTE: remove in #255
import trio


async def foo(): # ASYNC910: 0, "exit", Statement('function definition', lineno)
with suppress():
await foo()

0 comments on commit 3021de5

Please sign in to comment.