def test_read_raw_features_with_bad_lines(self): rfr = RawFeatureReader(self.features) features, lines = rfr.readRawFeatures(self.bad_lines) assert_equals(len(lines), 0)
def test_init_ts_should_be_the_first_feature(self): rfr = RawFeatureReader(self.good_features) assert_equals(rfr.rawFeatureNames()[0], 'ts')
def test_read_raw_features_with_good_lines_n_bad_lines(self): rfr = RawFeatureReader(self.features) features, lines = rfr.readRawFeatures(self.good_lines_n_bad_lines) assert_equals(len(lines), 1) assert_equals([lines[0][features['ts']],lines[0][features['gsr']],lines[0][features['hr']]], [1.1,1.2,1.3])
def test_init_with_right_feature_numbers(self): rfr = RawFeatureReader(self.good_features) assert_equals(len(rfr.rawFeatureNames()), 3)