def test_reverse_complement_invalid_inputs(test_input, expectation): """Tests the behaviour of the reverse_complement function with unexpected inputs""" with expectation: rfm.reverse_complement(test_input)
def test_reverse_complement_invalid_sequences(test_seq, expected): """Tests the behaviour of the reverseComplement function with different sequence inputs""" assert rfm.reverse_complement(test_seq) == expected
def test_reverse_result(): assert rfm.reverse_complement("AACTGGCATgctatgcat") == "ATGCATAGCATGCCAGTT"
def test_result_orientation(): with pytest.raises(AssertionError): assert rfm.reverse_complement("AACTGGCATgctatgcat") == "TTGACCGTACGATACGTA"
def test_lower_case(): rfm.reverse_complement("a")
def test_empty_list(): rfm.reverse_complement([])
def test_amb(): with pytest.raises(KeyError): rfm.reverse_complement("AAAAAACCCCTTTTGGCTTATCGX")
def test_non_str_reverse(): with pytest.raises(TypeError): rfm.reverse_complement(9)
def test_empty_reverse(): with pytest.raises(TypeError): rfm.reverse_complement()