Skip to content

Commit f383fe6

Browse files
committed
update tests
1 parent bffc30c commit f383fe6

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

tests/eval_files/async112.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,34 +9,34 @@
99
import trio as noterror
1010

1111
# error
12-
with trio.open_nursery() as n: # error: 5, "n"
12+
with trio.open_nursery() as n: # error: 5, "n", "nursery"
1313
n.start(...)
1414

15-
with trio.open_nursery(...) as nurse: # error: 5, "nurse"
15+
with trio.open_nursery(...) as nurse: # error: 5, "nurse", "nursery"
1616
nurse.start_soon(...)
1717

18-
with trio.open_nursery() as n: # error: 5, "n"
18+
with trio.open_nursery() as n: # error: 5, "n", "nursery"
1919
n.start_soon(n=7)
2020

2121

2222
async def foo():
23-
async with trio.open_nursery() as n: # error: 15, "n"
23+
async with trio.open_nursery() as n: # error: 15, "n", "nursery"
2424
n.start(...)
2525

2626

2727
# weird ones with multiple `withitem`s
2828
# but if split among several `with` they'd all be treated as error (or ASYNC111), so
2929
# treating as error for now.
30-
with trio.open_nursery() as n, trio.open("") as n: # error: 5, "n"
30+
with trio.open_nursery() as n, trio.open("") as n: # error: 5, "n", "nursery"
3131
n.start(...)
3232

33-
with open("") as o, trio.open_nursery() as n: # error: 20, "n"
33+
with open("") as o, trio.open_nursery() as n: # error: 20, "n", "nursery"
3434
n.start(o)
3535

36-
with trio.open_nursery() as n, trio.open_nursery() as nurse: # error: 31, "nurse"
36+
with trio.open_nursery() as n, trio.open_nursery() as nurse: # error: 31, "nurse", "nursery"
3737
nurse.start(n.start(...))
3838

39-
with trio.open_nursery() as n, trio.open_nursery() as n: # error: 5, "n" # error: 31, "n"
39+
with trio.open_nursery() as n, trio.open_nursery() as n: # error: 5, "n", "nursery" # error: 31, "n", "nursery"
4040
n.start(...)
4141

4242
# safe if passing variable as parameter
@@ -83,7 +83,7 @@ async def foo():
8383

8484
# body is a call to await n.start
8585
async def foo_1():
86-
with trio.open_nursery(...) as n: # error: 9, "n"
86+
with trio.open_nursery(...) as n: # error: 9, "n", "nursery"
8787
await n.start(...)
8888

8989

tests/eval_files/async112_anyio.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ async def bar(*args): ...
1111

1212

1313
async def foo():
14-
async with anyio.create_task_group() as tg: # error: 15, "tg"
14+
async with anyio.create_task_group() as tg: # error: 15, "tg", "taskgroup"
1515
await tg.start_soon(bar())
1616

1717
async with anyio.create_task_group() as tg:
1818
await tg.start(bar(tg))
1919

20-
async with anyio.create_task_group() as tg: # error: 15, "tg"
20+
async with anyio.create_task_group() as tg: # error: 15, "tg", "taskgroup"
2121
tg.start_soon(bar())
2222

2323
async with anyio.create_task_group() as tg:

tests/eval_files/async112_asyncio.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ async def bar(*args): ...
1313

1414

1515
async def foo():
16-
async with asyncio.TaskGroup() as tg: # error: 15, "tg"
16+
async with asyncio.TaskGroup() as tg: # error: 15, "tg", "taskgroup"
1717
tg.create_task(bar())
1818

1919
async with asyncio.TaskGroup() as tg:

0 commit comments

Comments
 (0)