Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_degradation_with_ols(self):
''' Test degradation with ols. '''
funcName = sys._getframe().f_code.co_name
print '\r', 'Running ', funcName
# test ols degradation calc
print 'Frequency: ', self.input_freq
rd_result = degradation_ols(self.test_ols_corr_energy)
self.assertAlmostEqual(rd_result[0], 100*self.rd, places=1)
print 'Actual: ', 100*self.rd
print 'Estimated: ', rd_result[0]
def test_degradation_with_ols(self):
''' Test degradation with ols. '''
funcName = sys._getframe().f_code.co_name
print '\r', 'Running ', funcName
# test ols degradation calc
for input_freq in self.list_ols_input_freq:
print 'Frequency: ', input_freq
rd_result = degradation_ols(self.test_corr_energy[input_freq])
self.assertAlmostEqual(rd_result[0], 100 * self.rd, places=1)
print 'Actual: ', 100 * self.rd
print 'Estimated: ', rd_result[0]