-
Notifications
You must be signed in to change notification settings - Fork 16.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Limit blockbuster to calls originated from langchain_core
- Loading branch information
Showing
5 changed files
with
24 additions
and
7 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import time | ||
|
||
import pytest | ||
from blockbuster import BlockingError | ||
|
||
from langchain_core import sys_info | ||
|
||
|
||
async def test_blockbuster_setup(): | ||
"""Check if blockbuster is correctly setup.""" | ||
# Blocking call outside of langchain_core is allowed. | ||
time.sleep(0.01) # noqa: ASYNC251 | ||
with pytest.raises(BlockingError): | ||
# Blocking call from langchain_core raises BlockingError. | ||
sys_info.print_sys_info() |