Skip to content

Commit a7dd1de

Browse files
Skn0ttCopilot
andcommitted
test: drop white-box async orphan-callback check
The sync subprocess test already covers the user-visible warning. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 358aa828-ed44-482a-8a83-91d435d25b38
1 parent c7e1bce commit a7dd1de

1 file changed

Lines changed: 0 additions & 18 deletions

File tree

‎tests/async/test_asyncio.py‎

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -68,24 +68,6 @@ def exception_handler(loop: asyncio.AbstractEventLoop, context: Dict) -> None:
6868
asyncio.get_running_loop().set_exception_handler(None)
6969

7070

71-
async def test_should_not_orphan_callback_on_non_serializable_params(
72-
browser_name: str,
73-
launch_arguments: Dict,
74-
) -> None:
75-
# Regression test for https://github.com/microsoft/playwright-python/issues/3165.
76-
# A failed transport.send must not leave a ProtocolCallback in connection._callbacks
77-
# (cleanup would later set_exception on it → "Future exception was never retrieved").
78-
async with async_playwright() as p:
79-
browser = await p[browser_name].launch(**launch_arguments)
80-
page = await browser.new_page()
81-
connection = page._impl_obj._connection
82-
before = set(connection._callbacks)
83-
with pytest.raises(TypeError, match="JSON serializable"):
84-
await page.locator("asdf").highlight(style=object()) # type: ignore
85-
assert set(connection._callbacks) == before
86-
await browser.close()
87-
88-
8971
async def test_async_playwright_stop_multiple_times() -> None:
9072
playwright = await async_playwright().start()
9173
await playwright.stop()

0 commit comments

Comments
 (0)