fix: finish test_isolated cleanup on Ctrl+C

uv run forwards SIGINT to the child that already got it from the
process group, so the second KeyboardInterrupt aborted the cleanup and
left the test container and database behind. Run the script with
$(PYTHON) like the skeleton checks and ignore SIGINT during cleanup.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-01 15:41:37 +03:00
co-authored by Claude Opus 5.5
parent 4921afa39d
commit 90394ecdfb
2 changed files with 12 additions and 2 deletions
+3 -2
View File
@@ -166,10 +166,11 @@ student_test:
# образ на временной базе test_<POSTGRES_DB>: сборка, миграции, отдельный
# контейнер api на 127.0.0.1:TEST_APP_PORT, make test и make student_test,
# затем уборка при любом исходе. KEEP_TEST_DB=1 оставляет базу для разбора
# затем уборка при любом исходе. KEEP_TEST_DB=1 оставляет базу для разбора.
# $(PYTHON), а не uv run: uv повторно шлёт SIGINT, и Ctrl+C обрывал уборку
.PHONY: test_isolated
test_isolated: env_setup start_db
uv run python student-tests/run_isolated.py $(if $(KEEP_TEST_DB),--keep-db,)
$(PYTHON) student-tests/run_isolated.py $(if $(KEEP_TEST_DB),--keep-db,)
.PHONY: lint
lint: