예제 #1
0
 def test_success_le_trials(self):
     """ Test Case to ensure the correct number of subjects are output"""
     self.assertRaises(ValueError, lambda: randomization.double_biased_coin_urn(6, 5, 7, 8))
     self.assertRaises(ValueError, lambda: randomization.double_biased_coin_urn(6, 7, 9, 8))
     self.assertRaises(ValueError, lambda: randomization.double_biased_coin_urn(6, 5, 7, 5))
     result = randomization.double_biased_coin_urn(6, 6, 7, 8)
     self.assertEqual(len(result), 1)
     result = randomization.double_biased_coin_urn(6, 8, 7, 7)
     self.assertEqual(len(result), 1)
예제 #2
0
 def test_length(self):
     """ Test Case to ensure the correct number of subjects are output"""
     result = randomization.double_biased_coin_urn(5, 6, 7, 8)
     self.assertEqual(len(result), 1)