Skip to content

Commit f68418d

Browse files
hBouananeclaude
andcommitted
fix(tests): assert the precise exception a frozen dataclass raises
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent cae5262 commit f68418d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

tests/test_text_shaping.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
distinction is modelled explicitly and asserted here.
66
"""
77

8+
from dataclasses import FrozenInstanceError
9+
810
import pytest
911

1012
from ocrsmith.text import (
@@ -106,7 +108,7 @@ class TestShapedText:
106108
def test_is_immutable(self):
107109
shaped = ShapedText(logical="a", visual="a", direction=Direction.LTR)
108110

109-
with pytest.raises(Exception):
111+
with pytest.raises(FrozenInstanceError):
110112
shaped.visual = "b"
111113

112114
def test_reports_whether_reshaping_happened(self):

0 commit comments

Comments
 (0)