def test_degradation_with_ols(cls): ''' Test degradation with ols. ''' funcName = sys._getframe().f_code.co_name print '\r', 'Running ', funcName # test ols degradation calc for input_freq in cls.list_ols_input_freq: print 'Frequency: ', input_freq rd_result = degradation_ols(cls.test_corr_energy[input_freq]) cls.assertAlmostEqual(rd_result[0], 100 * cls.rd, places=1) print 'Actual: ', 100 * cls.rd print 'Estimated: ', rd_result[0]
def test_degradation_with_ols(self): ''' Test degradation with ols. ''' funcName = sys._getframe().f_code.co_name logging.debug('Running {}'.format(funcName)) # test ols degradation calc for input_freq in self.list_ols_input_freq: logging.debug('Frequency: {}'.format(input_freq)) rd_result = degradation_ols(self.test_corr_energy[input_freq]) self.assertAlmostEqual(rd_result[0], 100 * self.rd, places=1) logging.debug('Actual: {}'.format(100 * self.rd)) logging.debug('Estimated: {}'.format(rd_result[0]))
def test_degradation_with_ols(self): ''' Test degradation with ols. ''' # test ols degradation calc rd_result = degradation_ols(self.test_corr_energy) self.assertAlmostEqual(rd_result['Rd_pct'], 100 * self.rd, places=1)