1313from aind_data_schema .components .coordinates import Rotation , Scale , Translation
1414from aind_data_schema .components .wrappers import AssetPath
1515from aind_data_schema .utils .validators import (
16- AxisCountException ,
17- CoordinateSystemException ,
18- SystemNameException ,
1916 TimeValidation ,
2017 _convert_to_comparable ,
2118 _recurse_helper ,
@@ -107,27 +104,27 @@ def test_system_check_helper_valid(self):
107104
108105 def test_system_check_helper_missing_system_name (self ):
109106 """Test _system_check_helper with missing coordinate_system_name"""
110- with self .assertRaises (CoordinateSystemException ):
107+ with self .assertRaises (ValueError ):
111108 _system_check_helper (self .translation_wrapper , None , axis_count = 2 )
112109
113110 def test_system_check_helper_missing_axis_count (self ):
114111 """Test _system_check_helper with missing axis_count"""
115- with self .assertRaises (CoordinateSystemException ):
112+ with self .assertRaises (ValueError ):
116113 _system_check_helper (self .translation_wrapper , self .coordinate_system_name , axis_count = None )
117114
118115 def test_system_check_helper_wrong_system_name (self ):
119116 """Test _system_check_helper with wrong coordinate_system_name"""
120- with self .assertRaises (SystemNameException ) as context :
117+ with self .assertRaises (ValueError ) as context :
121118 _system_check_helper (self .translation_wrapper , "WRONG_SYSTEM" , axis_count = 2 )
122- self .assertEqual ("WRONG_SYSTEM" , context .exception . expected )
123- self .assertEqual (self .coordinate_system_name , context .exception . found )
119+ self .assertIn ("WRONG_SYSTEM" , str ( context .exception ) )
120+ self .assertIn (self .coordinate_system_name , str ( context .exception ) )
124121
125122 def test_system_check_helper_wrong_axis_count (self ):
126123 """Test _system_check_helper with wrong axis_count"""
127- with self .assertRaises (AxisCountException ) as context :
124+ with self .assertRaises (ValueError ) as context :
128125 _system_check_helper (self .translation_wrapper , self .coordinate_system_name , axis_count = 3 )
129- self .assertEqual ( 3 , context .exception . expected )
130- self .assertEqual ( 2 , context .exception . found )
126+ self .assertIn ( "3" , str ( context .exception ) )
127+ self .assertIn ( "2" , str ( context .exception ) )
131128
132129 def test_system_check_helper_multiple_axis_types (self ):
133130 """Test _system_check_helper with multiple axis types"""
@@ -176,7 +173,7 @@ def test_recursive_coord_system_check_with_invalid_system_name(self):
176173 translation = [0.5 , 1 ],
177174 ),
178175 )
179- with self .assertRaises (SystemNameException ) as context :
176+ with self .assertRaises (ValueError ) as context :
180177 recursive_coord_system_check (data , self .coordinate_system_name , axis_count = 2 )
181178
182179 self .assertIn ("System name mismatch" , str (context .exception ))
@@ -212,7 +209,7 @@ def test_recursive_coord_system_check_with_axis_count_mismatch(self):
212209 translation = [0.5 , 1 , 2 ],
213210 ),
214211 )
215- with self .assertRaises (AxisCountException ) as context :
212+ with self .assertRaises (ValueError ) as context :
216213 recursive_coord_system_check (data , self .coordinate_system_name , axis_count = 2 )
217214
218215 self .assertIn ("Axis count mismatch" , str (context .exception ))
@@ -227,7 +224,7 @@ class MockData(BaseModel):
227224
228225 data = MockData (coordinate_system_name = self .coordinate_system_name )
229226
230- with self .assertRaises (CoordinateSystemException ) as context :
227+ with self .assertRaises (ValueError ) as context :
231228 recursive_coord_system_check (data , None , axis_count = 0 )
232229
233230 self .assertIn ("CoordinateSystem is required" , str (context .exception ))
0 commit comments