@@ -420,11 +420,9 @@ def passValue(value):
420420 self .assertEqual (passValue (float ('inf' )), float ('inf' ))
421421 self .assertEqual (passValue (- float ('inf' )), - float ('inf' ))
422422 else :
423- f = passValue (float ('nan' ))
424- self .assertIsInstance (f , str )
425- self .assertEqual (f .lower ()[:3 ], 'nan' )
426423 self .assertEqual (float (passValue (float ('inf' ))), float ('inf' ))
427424 self .assertEqual (float (passValue (- float ('inf' ))), - float ('inf' ))
425+ # XXX NaN representation can be not parsable by float()
428426 self .assertEqual (passValue ((1 , '2' , (3.4 ,))),
429427 (1 , '2' , (3.4 ,)) if self .wantobjects else '1 2 3.4' )
430428
@@ -449,8 +447,6 @@ def float_eq(actual, expected):
449447 expected = float (expected )
450448 self .assertAlmostEqual (float (actual ), expected ,
451449 delta = abs (expected ) * 1e-10 )
452- def starts_with (actual , expected ):
453- self .assertEqual (actual .lower ()[:len (expected )], expected )
454450
455451 check (True , '1' )
456452 check (False , '0' )
@@ -474,7 +470,7 @@ def starts_with(actual, expected):
474470 check (f , f , eq = float_eq )
475471 check (float ('inf' ), 'Inf' , eq = float_eq )
476472 check (- float ('inf' ), '-Inf' , eq = float_eq )
477- check ( float ( 'nan' ), 'nan' , eq = starts_with )
473+ # XXX NaN representation can be not parsable by float( )
478474 check ((), '' )
479475 check ((1 , (2 ,), (3 , 4 ), '5 6' , ()), '1 2 {3 4} {5 6} {}' )
480476
0 commit comments