def testRegressionGaia14(self): ds = testdata.loadSmallDB() ds = transform(ds, 'fixlength') to_remove = testdata.TEST_SMALLDB_VARLENGTH dsr = transform(ds, 'remove', {'descriptorNames': to_remove}) self.compareResults(search(dsr, '1_ethno.wav', 5), testdata.SMALL_DB_RAW_RESULTS) dsc = transform(dsr, 'cleaner') self.compareResults(search(dsc, '1_ethno.wav', 5), testdata.SMALL_DB_CLEAN_RESULTS) dsn = transform(dsc, 'normalize') self.compareResults(search(dsn, '1_ethno.wav', 5), testdata.SMALL_DB_NORM_RESULTS) dspca = transform(dsn, 'pca', { 'resultName': 'pca30', 'dimension': 30, 'descriptorNames': '*' }) self.compareResults(search(dspca, '1_ethno.wav', 5), testdata.SMALL_DB_PCA_RESULTS)
def testOwnershipIssues(self): # 1: layout of a temp point becomes invalid Point().layout().descriptorNames() # 2: sample point of a dataset becomes invalid ds = testdata.loadSmallDB() p = ds.samplePoint() del ds p.name()
def testRegressionGaia14(self): ds = testdata.loadSmallDB() ds = transform(ds, 'fixlength') to_remove = testdata.TEST_SMALLDB_VARLENGTH dsr = transform(ds, 'remove', { 'descriptorNames': to_remove }) self.compareResults(search(dsr, '1_ethno.wav', 5), testdata.SMALL_DB_RAW_RESULTS) dsc = transform(dsr, 'cleaner') self.compareResults(search(dsc, '1_ethno.wav', 5), testdata.SMALL_DB_CLEAN_RESULTS) dsn = transform(dsc, 'normalize') self.compareResults(search(dsn, '1_ethno.wav', 5), testdata.SMALL_DB_NORM_RESULTS) dspca = transform(dsn, 'pca', { 'resultName': 'pca30', 'dimension': 30, 'descriptorNames': '*' }) self.compareResults(search(dspca, '1_ethno.wav', 5), testdata.SMALL_DB_PCA_RESULTS)