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
Use more descriptive function names in tests.
  • Loading branch information
nascheme committed Dec 2, 2024
commit e517ccb8e08fa7762c1fe080ea7cfc9d3c6b990e
14 changes: 7 additions & 7 deletions Lib/test/test_opcache.py
Original file line number Diff line number Diff line change
Expand Up @@ -1289,30 +1289,30 @@ async def __aenter__(self):
async def __aexit__(self, *exc):
pass

async def f():
async def send_with():
for i in range(100):
async with CM():
x = 1

run_async(f())
run_async(send_with())
# Note there are still unspecialized "SEND" opcodes in the
# cleanup paths of the 'with' statement.
self.assert_specialized(f, "SEND_GEN")
self.assert_specialized(send_with, "SEND_GEN")

@cpython_only
@requires_specialization_ft
def test_send_yield_from(self):
def g():
yield None

def f():
def send_yield_from():
yield from g()

for i in range(100):
list(f())
list(send_yield_from())

self.assert_specialized(f, "SEND_GEN")
self.assert_no_opcode(f, "SEND")
self.assert_specialized(send_yield_from, "SEND_GEN")
self.assert_no_opcode(send_yield_from, "SEND")

@cpython_only
@requires_specialization_ft
Expand Down