Example #1
0
 def test_options_11_by_give_5_10_get_7(self, mock_1, mock_2):
     expected = 7
     mock_2.return_value = 5, 10
     mock_1.return_value = 7
     result = calrand.options(11)
     self.assertEqual(expected, result)
Example #2
0
 def test_options_9_by_give_5_2_get_25(self, mock):
     expected = 25
     mock.return_value = 5, 2
     result = calrand.options(9)
     self.assertEqual(expected, result)
Example #3
0
 def test_options_10_by_give_80_1p8_get_24p691(self, mock):
     expected = 24.691
     mock.return_value = 80, 1.80
     result = calrand.options(10)
     self.assertEqual(expected, result)
Example #4
0
 def test_options_7_by_give_1_get_1p557(self, mock):
     expected = 1.557
     mock.return_value = 1
     result = calrand.options(7)
     self.assertEqual(expected, result)
Example #5
0
 def test_options_by_8_and_give_9_get_3(self, mock):
     expected = 3
     mock.return_value = 9
     result = calrand.options(8)
     self.assertEqual(expected, result)
Example #6
0
 def test_options_6_by_give_1_get_0p540(self, mock):
     expected = 0.540
     mock.return_value = 1
     result = calrand.options(6)
     self.assertEqual(expected, result)
Example #7
0
 def test_options_5_by_give_1_get_0p841(self, mock):
     expected = 0.841
     mock.return_value = 1
     result = calrand.options(5)
     self.assertEqual(expected, result)
Example #8
0
 def test_options_4_by_give_1_2_get_0p5(self, mock):
     expected = 0.5
     mock.return_value = 1, 2
     result = calrand.options(4)
     self.assertEqual(expected, result)
Example #9
0
 def test_options_3_by_give_1_2_get_2(self, mock):
     expected = 2
     mock.return_value = 1, 2
     result = calrand.options(3)
     self.assertEqual(expected, result)
Example #10
0
 def test_options_2_by_give_20_10_get_10(self, mock):
     expected = 10
     mock.return_value = 20, 10
     result = calrand.options(2)
     self.assertEqual(expected, result)