コード例 #1
0
 def test_constant(self):
     assert fix(1, 10) == 1
     assert fix(0, 10) == 0
コード例 #2
0
 def test_fix_m8(self):
     assert fix(-8, 10) == 3
コード例 #3
0
 def test_fix_m13(self):
     assert fix(-13, 10) == -2
コード例 #4
0
 def test_fix_m1_nan(self):
     assert isnan(fix(-1, NaN))
コード例 #5
0
 def test_fix_m2(self):
     assert fix(-2, 10) == 9
コード例 #6
0
 def test_fix_m1(self):
     assert fix(-1, 10) == 10
コード例 #7
0
 def test_constant_negative_size2(self):
     assert fix(10, NaN) == 10
コード例 #8
0
 def test_constant_negative_size(self):
     assert fix(10, -1) == 10