langchain/libs/core/tests/unit_tests/tracers
Christophe Bornet aab2e42169
core[patch]: Use Blockbuster to detect blocking calls in asyncio during tests (#29043)
This PR uses the [blockbuster](https://github.com/cbornet/blockbuster)
library in langchain-core to detect blocking calls made in the asyncio
event loop during unit tests.
Avoiding blocking calls is hard as these can be deeply buried in the
code or made in 3rd party libraries.
Blockbuster makes it easier to detect them by raising an exception when
a call is made to a known blocking function (eg: `time.sleep`).

Adding blockbuster allowed to find a blocking call in
`aconfig_with_context` (it ends up calling `get_function_nonlocals`
which loads function code).

**Dependencies:**
- blockbuster (test)

**Twitter handle:** cbornet_
2025-01-31 10:06:34 -05:00
..
__init__.py core[patch], langchain[patch]: fix required deps (#14373) 2023-12-07 14:24:58 -08:00
test_async_base_tracer.py core: Add ruff rules for comprehensions (C4) (#26829) 2024-09-25 09:34:17 -04:00
test_base_tracer.py core: Add ruff rules for comprehensions (C4) (#26829) 2024-09-25 09:34:17 -04:00
test_imports.py core[patch], langchain[patch]: fix required deps (#14373) 2023-12-07 14:24:58 -08:00
test_langchain.py core: Auto-fix some docstrings (#29337) 2025-01-21 13:29:53 -05:00
test_memory_stream.py core[patch]: Use Blockbuster to detect blocking calls in asyncio during tests (#29043) 2025-01-31 10:06:34 -05:00
test_run_collector.py community[patch]: update use of deprecated llm methods (#20393) 2024-04-12 17:28:23 -04:00
test_schemas.py core[patch], langchain[patch], community[patch]: Revert #15326 (#15546) 2024-01-04 10:39:37 -05:00