test: add unit tests for make_detector factory (#48)#67
Open
gitcommit90 wants to merge 1 commit into
Open
Conversation
Covers the previously-untested factory: - returns the correct detector class for each method (transformer, llm, rag_fact_checker), passing kwargs through - raises ValueError listing valid options on an unknown method Concrete detector classes are patched at their source modules (make_detector imports them lazily), so no model download is required, matching the mocking style in test_inference_pytest.py.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tests/test_factory_pytest.py(following the repo'stest_*_pytest.pynaming).Closes #48