File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -187,7 +187,10 @@ def test_pack_unpack_roundtrip_nans(self):
187187        for  _  in  range (100 ):
188188            for  size  in  (2 , 4 , 8 ):
189189                sign  =  random .randint (0 , 1 )
190-                 quiet  =  random .randint (0 , 1 )
190+                 if  sys .platform  !=  'win32' :
191+                     quiet  =  random .randint (0 , 1 )
192+                 else :
193+                     quiet  =  1   # doesn't work for sNaN's here 
191194                if  size  ==  8 :
192195                    payload  =  random .randint (0  if  quiet  else  1 , 1 << 50 )
193196                    i  =  (sign << 63 ) +  (0x7ff << 52 ) +  (quiet << 51 ) +  payload 
Original file line number Diff line number Diff line change @@ -936,6 +936,9 @@ def test_half_float(self):
936936            self .assertTrue (math .isnan (struct .unpack ('>e' , bits [::- 1 ])[0 ]))
937937
938938            # Check round-trip for NaN's: 
939+             if  (sys .platform  ==  'win32' 
940+                     and  not  (int .from_bytes (bits [::- 1 ]) &  (1 << 9 ))):
941+                 continue   # doesn't work for sNaN's here 
939942            nan  =  struct .unpack ('<e' , bits )[0 ]
940943            self .assertEqual (struct .pack ('<e' , nan ), bits )
941944            nan  =  struct .unpack ('>e' , bits [::- 1 ])[0 ]
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments