Example #1
0
 def test_clip_above_range(self):
     assert_that(clip(1.5, 0, 1), equal_to(1.0))
Example #2
0
 def test_clip_below_range(self):
     assert_that(clip(-0.5, 0, 1), equal_to(0.0))
Example #3
0
 def test_clip_in_range(self):
     assert_that(clip(0.5, 0, 1), equal_to(0.5))
Example #4
0
 def test_clip_above_range(self):
     assert_that(clip(1.5, 0, 1), equal_to(1.0))
Example #5
0
 def test_clip_below_range(self):
     assert_that(clip(-0.5, 0, 1), equal_to(0.0))
Example #6
0
 def test_clip_in_range(self):
     assert_that(clip(0.5, 0, 1), equal_to(0.5))