Pytest Plugin¶
langsmith.pytest_plugin
¶
LangSmith Pytest hooks.
FUNCTION | DESCRIPTION |
---|---|
pytest_addoption |
Set a boolean flag for LangSmith output. |
pytest_cmdline_preparse |
Call immediately after command line options are parsed (pytest v7). |
pytest_load_initial_conftests |
Handle args in pytest v8+. |
pytest_runtest_call |
Apply LangSmith tracking to tests marked with @pytest.mark.langsmith. |
pytest_report_teststatus |
Remove the short test-status character outputs ("./F"). |
pytest_configure |
Register the 'langsmith' marker. |
LangSmithPlugin
¶
Plugin for rendering LangSmith results.
METHOD | DESCRIPTION |
---|---|
__init__ |
Initialize. |
pytest_collection_finish |
Call after collection phase is completed and session.items is populated. |
add_process_to_test_suite |
Group a test case with its test suite. |
update_process_status |
Update test results. |
pytest_runtest_logstart |
Initialize live display when first test starts. |
generate_tables |
Generate a collection of tables—one per suite. |
pytest_configure |
Disable warning reporting and show no warnings in output. |
pytest_sessionfinish |
Stop Rich Live rendering at the end of the session. |
pytest_collection_finish
¶
Call after collection phase is completed and session.items is populated.
add_process_to_test_suite
¶
Group a test case with its test suite.
pytest_runtest_logstart
¶
Initialize live display when first test starts.
generate_tables
¶
Generate a collection of tables—one per suite.
Returns a 'Group' object so it can be rendered simultaneously by Rich Live.
pytest_configure
¶
Disable warning reporting and show no warnings in output.
pytest_sessionfinish
¶
Stop Rich Live rendering at the end of the session.
pytest_addoption
¶
Set a boolean flag for LangSmith output.
Skip if --langsmith-output is already defined.
pytest_cmdline_preparse
¶
Call immediately after command line options are parsed (pytest v7).
pytest_report_teststatus
¶
Remove the short test-status character outputs ("./F").