@@ -1377,10 +1377,10 @@ def equivalent_python(n, length, byteorder, signed=False):
13771377 self .assertRaises (OverflowError , (256 ).to_bytes , 1 , 'big' , signed = True )
13781378 self .assertRaises (OverflowError , (256 ).to_bytes , 1 , 'little' , signed = False )
13791379 self .assertRaises (OverflowError , (256 ).to_bytes , 1 , 'little' , signed = True )
1380- self .assertRaises (OverflowError , (128 ).to_bytes , 0 , 'big' , signed = True )
1381- self .assertRaises (OverflowError , (128 ).to_bytes , 0 , 'little' , signed = True )
1382- self .assertRaises (OverflowError , (- 129 ).to_bytes , 0 , 'big' , signed = True )
1383- self .assertRaises (OverflowError , (- 129 ).to_bytes , 0 , 'little' , signed = True )
1380+ self .assertRaises (OverflowError , (128 ).to_bytes , 1 , 'big' , signed = True )
1381+ self .assertRaises (OverflowError , (128 ).to_bytes , 1 , 'little' , signed = True )
1382+ self .assertRaises (OverflowError , (- 129 ).to_bytes , 1 , 'big' , signed = True )
1383+ self .assertRaises (OverflowError , (- 129 ).to_bytes , 1 , 'little' , signed = True )
13841384 self .assertRaises (OverflowError , (- 1 ).to_bytes , 2 , 'big' , signed = False )
13851385 self .assertRaises (OverflowError , (- 1 ).to_bytes , 2 , 'little' , signed = False )
13861386 self .assertEqual ((0 ).to_bytes (0 , 'big' ), b'' )
0 commit comments