def setUp(self): min_freq = 0.1 max_freq = .7 most_likely = .3 kurtosis = 1 low_loss = 1 high_loss = 10 self.s = pertloss.PERTLoss(low_loss, high_loss, min_freq, max_freq, most_likely, kurtosis=kurtosis)
def testLowHighLoss(self): # High loss must exceed low loss with self.assertRaises(AssertionError): pertloss.PERTLoss(100, 10, .1, .7, .3) # min > max
def testMostLikelyFrequency(self): # Most likely frequency must be between min and max. with self.assertRaises(AssertionError): pertloss.PERTLoss(10, 100, .1, .7, .8) # most_likely > max
def testMinMaxFrequency(self): # Min must be less than max. with self.assertRaises(AssertionError): pertloss.PERTLoss(10, 100, .7, .1, .3) # min > max