File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -188,7 +188,13 @@ class SetIntSet:
188188
189189 with self .assertRaises (TypeError ) as err_info :
190190 schema .load ({"value" : {set ()}})
191- self .assertEqual (str (err_info .exception ), "unhashable type: 'set'" )
191+ self .assertIn (
192+ str (err_info .exception ),
193+ {
194+ "unhashable type: 'set'" ,
195+ "cannot use 'set' as a set element (unhashable type: 'set')" ,
196+ },
197+ )
192198
193199 @dataclass ()
194200 class Elm :
@@ -202,7 +208,13 @@ class SetOfDataclass:
202208
203209 with self .assertRaises (TypeError ) as err_info :
204210 schema .load ({"value" : {{"value" : {set ()}}}})
205- self .assertEqual (str (err_info .exception ), "unhashable type: 'set'" )
211+ self .assertIn (
212+ str (err_info .exception ),
213+ {
214+ "unhashable type: 'set'" ,
215+ "cannot use 'set' as a set element (unhashable type: 'set')" ,
216+ },
217+ )
206218
207219 def test_set_of_frozen_dataclass (self ):
208220 @dataclass (frozen = True )
You can’t perform that action at this time.
0 commit comments