From f1c8373cab8e59ccb18181bd6a3e9260f682ac18 Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Sun, 26 Jul 2026 22:32:08 +0800 Subject: [PATCH] =?UTF-8?q?fix(ci):=20=E4=BF=AE=E5=A4=8Druff=E5=85=A8?= =?UTF-8?q?=E9=87=8F=E6=A3=80=E6=9F=A5=E9=94=99=E8=AF=AF=20-=20test=5Fclip?= =?UTF-8?q?=5Foperations.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/unit/test_clip_operations.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/unit/test_clip_operations.py b/tests/unit/test_clip_operations.py index 2c78fceaf..d93115692 100755 --- a/tests/unit/test_clip_operations.py +++ b/tests/unit/test_clip_operations.py @@ -12,7 +12,7 @@ from __future__ import annotations import unittest -from dataclasses import dataclass +from dataclasses import FrozenInstanceError, dataclass from packages.domain.clip_operations import ( ROUND_PRECISION, @@ -166,7 +166,7 @@ class TestCalculateSplit(unittest.TestCase): def test_frozen_result(self): """SplitResult 是 frozen dataclass。""" result = calculate_split(duration=5.0, split_time=2.0) - with self.assertRaises(Exception): + with self.assertRaises(FrozenInstanceError): result.left_duration = 3.0 # type: ignore[misc] @@ -410,7 +410,7 @@ class TestCalculateMerge(unittest.TestCase): _MockClip(id="c2", order=1, duration=3.0), ] result = calculate_merge(clips) - with self.assertRaises(Exception): + with self.assertRaises(FrozenInstanceError): result.total_duration = 10.0 # type: ignore[misc]