Skip to content

test: add unit tests for make_detector factory (#48)#67

Open
gitcommit90 wants to merge 1 commit into
KRLabsOrg:mainfrom
gitcommit90:test/issue-48-factory-tests
Open

test: add unit tests for make_detector factory (#48)#67
gitcommit90 wants to merge 1 commit into
KRLabsOrg:mainfrom
gitcommit90:test/issue-48-factory-tests

Conversation

@gitcommit90

Copy link
Copy Markdown
Contributor

Summary

  • Add tests/test_factory_pytest.py (following the repo's test_*_pytest.py naming).
  • Four focused tests: transformer type, invalid method, kwargs passthrough, config field types.

Closes #48

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expand unit tests: factory, detector output formats, taxonomy cascade

1 participant