@@ -225,8 +225,6 @@ def __dict__(self):
225225 with self .assertRaises (ZeroDivisionError ):
226226 WorseStruct ().__setstate__ ({}, b'foo' )
227227
228- @unittest .skipUnless (sys .float_repr_style == 'short' ,
229- "applies only when using short float repr style" )
230228 def test_parameter_repr (self ):
231229 self .assertRegex (repr (c_bool .from_param (True )), r"^<cparam '\?' at 0x[A-Fa-f0-9]+>$" )
232230 self .assertEqual (repr (c_char .from_param (97 )), "<cparam 'c' ('a')>" )
@@ -243,7 +241,8 @@ def test_parameter_repr(self):
243241 self .assertRegex (repr (c_ulonglong .from_param (20000 )), r"^<cparam '[LIQ]' \(20000\)>$" )
244242 self .assertEqual (repr (c_float .from_param (1.5 )), "<cparam 'f' (1.5)>" )
245243 self .assertEqual (repr (c_double .from_param (1.5 )), "<cparam 'd' (1.5)>" )
246- self .assertEqual (repr (c_double .from_param (1e300 )), "<cparam 'd' (1e+300)>" )
244+ if sys .float_repr_style == 'short' :
245+ self .assertEqual (repr (c_double .from_param (1e300 )), "<cparam 'd' (1e+300)>" )
247246 self .assertRegex (repr (c_longdouble .from_param (1.5 )), r"^<cparam ('d' \(1.5\)|'g' at 0x[A-Fa-f0-9]+)>$" )
248247 self .assertRegex (repr (c_char_p .from_param (b'hihi' )), r"^<cparam 'z' \(0x[A-Fa-f0-9]+\)>$" )
249248 self .assertRegex (repr (c_wchar_p .from_param ('hihi' )), r"^<cparam 'Z' \(0x[A-Fa-f0-9]+\)>$" )
0 commit comments