예제 #1
0
	def test0(self):
		self.assertAlmostEqual(raptor.wilson95(1, 1), 20.654329147389294, 4)
		self.assertAlmostEqual(raptor.wilson95(2, 2), 34.23719528896193, 4)
		self.assertAlmostEqual(raptor.wilson95(0, 1), 0, 4)
		self.assertAlmostEqual(raptor.wilson95(0, 0), 0, 4)		# invalid input
예제 #2
0
	def testNeg(self):
		self.assertAlmostEqual(raptor.wilson95(-1, -2), 0, 4) 	# invalid input
		self.assertAlmostEqual(raptor.wilson95(-1, 2), 0, 4) 	# invalid input
예제 #3
0
	def testNormal(self):
		self.assertAlmostEqual(raptor.wilson95(1, 3), 6.149031527616, 4)
		self.assertAlmostEqual(raptor.wilson95(2, 6), 9.676933255922, 4)
		self.assertAlmostEqual(raptor.wilson95(2, 7), 8.221716570902, 4)
		self.assertAlmostEqual(raptor.wilson95(100, 300), 28.239256, 4)
		self.assertAlmostEqual(raptor.wilson95(20, 40), 35.19928, 4)