def test_empty_sequence_gives_zero_totals(self): # arrange the data needed for testing empty_sequence = "" # call the count function with the test data totals = nucleotide.count(empty_sequence) # expectation is a 0 total for each nucleotide self.assertTrue([t for t in totals.values() if t != 0] == [], "Totals should be zero for empty sequence.")
def test_lowercase_sequence_gives_correct_totals(self): sequence = "acgt" # test all symbols in lowercase totals = nucleotide.count(sequence) self.assertTrue([t for t in totals.values() if t != 1] == [], "Lowercase a,c,g,t should be recognised as valid input.")