Example #1
0
 def test_p_is_none(self):
     random.choice(3, 1, True)
     self.m.choice.assert_called_with(3, 1, True, None)
Example #2
0
 def test_no_none(self):
     random.choice(3, 1, True, [0.1, 0.1, 0.8])
     self.m.choice.assert_called_with(3, 1, True, [0.1, 0.1, 0.8])
Example #3
0
 def test_replace_is_none(self):
     random.choice(3, 1, None, [0.1, 0.1, 0.8])
     self.m.choice.assert_called_with(3, 1, None, [0.1, 0.1, 0.8])
Example #4
0
 def test_size_is_none(self):
     random.choice(3, None, True, [0.1, 0.1, 0.8])
     self.m.choice.assert_called_with(3, None, True, [0.1, 0.1, 0.8])
Example #5
0
 def test_replace_and_p_are_none(self):
     random.choice(3, 1)
     self.m.choice.assert_called_with(3, 1, True, None)
Example #6
0
 def test_size_and_p_are_none(self):
     random.choice(3, None, True)
     self.m.choice.assert_called_with(3, None, True, None)
Example #7
0
 def test_size_and_replace_are_none(self):
     random.choice(3, None, None, [0.1, 0.1, 0.8])
     self.m.choice.assert_called_with(3, None, None, [0.1, 0.1, 0.8])