참고소스 수정본
This commit is contained in:
12
참고/instructor-main/tests/test_logging.py
Normal file
12
참고/instructor-main/tests/test_logging.py
Normal file
@@ -0,0 +1,12 @@
|
||||
import logging
|
||||
from instructor.auto_client import from_provider
|
||||
|
||||
|
||||
def test_from_provider_logging(caplog):
|
||||
caplog.set_level(logging.INFO)
|
||||
from_provider("ollama/llama3.2")
|
||||
assert any(
|
||||
"Initializing ollama provider" in record.getMessage()
|
||||
for record in caplog.records
|
||||
)
|
||||
assert any("Client initialized" in record.getMessage() for record in caplog.records)
|
||||
Reference in New Issue
Block a user