Skip to content

Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.

Use asyncio.run() instead of get_event_loop() for Python 3.12+ compat

Atharva Jaiswaldd49118a7b21
diff --git a/tests/ci/test_observability.py b/tests/ci/test_observability.py
index fcec68778..a35237256 100644
--- a/tests/ci/test_observability.py
+++ b/tests/ci/test_observability.py
@@ -98,5 +98,5 @@ class TestLmnrImportFallback:
async def my_async_func(x, y):
return x + y
- result = asyncio.get_event_loop().run_until_complete(my_async_func(3, 4))
+ result = asyncio.run(my_async_func(3, 4))
assert result == 7