def testLookupLargeTValue(self): """Tests a lookup when the given t-value is very large.""" self.assertEqual(0.01, ttest._LookupPValue(500.0, 1)) self.assertEqual(0.01, ttest._LookupPValue(-500.0, 1))
def testLookupExactMatch(self): """Tests a lookup when there is an exact match.""" self.assertEqual(0.1, ttest._LookupPValue(3.182, 3)) self.assertEqual(0.1, ttest._LookupPValue(-3.182, 3))
def testLookupAbove(self): """Tests a lookup when the given value is above an entry in the table.""" self.assertEqual(0.2, ttest._LookupPValue(3.1, 2)) self.assertEqual(0.2, ttest._LookupPValue(-3.1, 2))
def testLookupZeroTValue(self): """Tests a lookup when the given t-value is zero.""" self.assertEqual(1, ttest._LookupPValue(0.0, 1)) self.assertEqual(1, ttest._LookupPValue(0.0, 2))
def testLookupLargeDF(self): """Tests a lookup when the given degrees of freedom is large.""" self.assertEqual(0.02, ttest._LookupPValue(5.0, 50))