def test_get_dup_labels_perc_with_dupes(self): """ Properly gets percentage of duplicate labels """ # half of the labels are duplicates labels = ['seq1', 'seq2', 'seq1', 'seq2'] actual_perc = get_dup_labels_perc(labels) expected_perc = "%1.3f" % 0.5 self.assertEqual(actual_perc, expected_perc)
def test_get_dup_labels_perc_all_valid(self): """ Properly gets percentage of duplicate labels """ # No duplicates labels = ['seq1', 'seq2', 'seq3', 'seq4'] actual_perc = get_dup_labels_perc(labels) expected_perc = "%1.3f" % 0.0 self.assertEqual(actual_perc, expected_perc)