style: format Python files with Ruff
Deploy TodoList / deploy (push) Successful in 4s

This commit is contained in:
2026-07-31 10:26:51 +08:00
parent 2fedb6736a
commit 99e42f8be4
5 changed files with 64 additions and 41 deletions
+6 -2
View File
@@ -8,19 +8,23 @@ def test_todocreate_requires_task() -> None:
with pytest.raises(ValidationError):
todocreate()
def test_todocreate_accepts_valid_task() -> None:
todo_data = todocreate(task = "学习测试单元")
todo_data = todocreate(task="学习测试单元")
assert todo_data.task == "学习测试单元"
def test_todocreate_rejects_empty_task() -> None:
with pytest.raises(ValidationError):
todocreate(task="")
def test_todocreate_rejects_blank_task() -> None:
with pytest.raises(ValidationError):
todocreate(task=" ")
def test_todocreate_rejects_task_longer_than_200_characters() -> None:
long_task = "a" * 201