|
All checks were successful
CI Trade-In / changes (pull_request) Successful in 9s
CI Trade-In / backend-tests (pull_request) Has been skipped
CI / changes (pull_request) Successful in 9s
CI Trade-In / browser-tests (pull_request) Has been skipped
CI Trade-In / frontend-checks (pull_request) Has been skipped
CI / frontend-tests (pull_request) Has been skipped
CI / openapi-codegen-check (pull_request) Successful in 1m55s
CI / backend-tests (pull_request) Successful in 17m14s
Проверка непустоты стояла ДО очистки:
if not quarters: # [" "] — непустой, проходит
raise HTTPException(400, ...)
return [q.strip() for q in quarters if q.strip()] # → []
Список из одних пробелов проходил как непустой, а после strip оставался пустым.
Дальше по коду это молча создавало job с нулём кварталов, ставило его в очередь
Celery и возвращало targets_total=0 с estimate_minutes=0.0 — пустышку,
неотличимую в списке заданий от настоящей.
Правка: сначала чистим, потом проверяем. Прежние отказы (None, []) сохраняются.
Тест проверяет ПОВЕДЕНИЕ: на пробельном вводе функция обязана отказать. Против
origin/main три случая падают с «DID NOT RAISE» — то есть по отсутствию отказа,
а не по отсутствию символа.
[" "], ["", " ", "\t"], ["\n"] → DID NOT RAISE → падает
None и [] — контроль, зелёный с обеих сторон
годный список проходит и чистится — контроль, зелёный с обеих сторон
смешанный список сохраняет живые — контроль, зелёный с обеих сторон
Третий и четвёртый контроли не для симметрии: они ловят «починку», которая
отказывала бы на любом вводе с пробелами или отбрасывала бы смешанный список
целиком.
Прогоны: tests/api/v1 -k cadastre — 7 passed rc=0.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| __init__.py | ||
| conftest.py | ||
| test_2464_confidence_zoning_source.py | ||
| test_2464_manual_list_validation.py | ||
| test_2464_parcels_savepoint_pair.py | ||
| test_2464_resume_geo_job_guard.py | ||
| test_2464g_noise_source_filter.py | ||
| test_admin_cadastre.py | ||
| test_admin_ekburg_permits.py | ||
| test_admin_jobs_settings.py | ||
| test_admin_scrape_freshness.py | ||
| test_admin_scrape_kn_catalog_waf_guard.py | ||
| test_analyze_competitors_status.py | ||
| test_analyze_inline_weights.py | ||
| test_analyze_market_price.py | ||
| test_analyze_osrm_distances.py | ||
| test_analyze_parcel_meta.py | ||
| test_analyze_recent_permits.py | ||
| test_analyze_zoning_regulation.py | ||
| test_chat.py | ||
| test_concept_recompute.py | ||
| test_custom_pois.py | ||
| test_insights.py | ||
| test_locations.py | ||
| test_market_pulse_and_neighbors_honesty.py | ||
| test_osrm_per_category.py | ||
| test_own_projects.py | ||
| test_parcel_best_layouts.py | ||
| test_parcel_by_bbox.py | ||
| test_parcel_competitors.py | ||
| test_parcel_connection_capacity.py | ||
| test_parcel_connection_points.py | ||
| test_parcel_neighbor_buildings.py | ||
| test_parcel_report.py | ||
| test_parcel_snapshot_exclude_dev.py | ||
| test_parcel_utility_infrastructure.py | ||
| test_parcels_forecast.py | ||
| test_poi_detail_from_tags.py | ||
| test_run_history_and_response_contract.py | ||