fix(test): unpin general-threshold test from old 0.95 default (alembic 0029)
CI / lint (push) Successful in 3s
CI / frontend-build (push) Successful in 19s
CI / backend-lint-and-test (push) Successful in 26s
CI / intimp (push) Successful in 3m38s
CI / intapi (push) Successful in 7m55s
CI / intcore (push) Successful in 8m46s

This commit is contained in:
2026-06-01 02:18:54 -04:00
parent af7b5c95e9
commit 5d284aae9f
+5 -2
View File
@@ -25,10 +25,13 @@ def _img(sha: str, predictions: dict) -> ImageRecord:
@pytest.mark.asyncio
async def test_threshold_filters_low_confidence_general(db):
# Default general threshold is 0.50 (alembic 0029 lowered it from
# 0.95). Use 0.30/0.60 to keep the test asserting threshold behavior
# rather than the exact cutoff number.
img = _img(
"a" * 64,
{
"smile": {"category": "general", "confidence": 0.80},
"lowconf": {"category": "general", "confidence": 0.30},
"sword": {"category": "general", "confidence": 0.97},
},
)
@@ -37,7 +40,7 @@ async def test_threshold_filters_low_confidence_general(db):
sl = await SuggestionService(db).for_image(img.id)
names = [s.display_name for s in sl.by_category.get("general", [])]
assert "sword" in names
assert "smile" not in names
assert "lowconf" not in names
@pytest.mark.asyncio