You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Turn LettuceDetectDeprecationWarning into a test error #136
New code must not call deprecated names. Without a pytest filter, nothing stops it, and the five existing test modules that call old names would break once the filter exists.
Current behavior
pyproject.toml:67[tool.pytest.ini_options] has no filterwarnings. python_files = "test_*_pytest.py" at :69.
Test modules that call old names: tests/test_inference_pytest.py, tests/test_llm_detector_pytest.py, tests/test_llm_client_pytest.py, tests/test_custom_taxonomy_pytest.py, tests/test_factory_pytest.py.
Steps
Add filterwarnings = ["error::lettucedetect.detectors._deprecation.LettuceDetectDeprecationWarning"] to the pytest config (or the importable path pytest accepts for the class).
Add one module-level pytestmark = pytest.mark.filterwarnings("ignore::...LettuceDetectDeprecationWarning") to each of the five modules above. No other edit in them.
Add a test that pytest.warns(LettuceDetectDeprecationWarning) still records the warning under the error filter.
Acceptance criteria
A test calling a stand-in deprecated name without a mark fails.
The five modules each have exactly one added mark and no other change.
Activity
test: turn LettuceDetectDeprecationWarning into a test error (#136)