Exemplo n.º 1
0
def test_count_with_string():
    seq = BioSeq('acgttccgccgggg')
    substr = "cg"
    count_result = seq.count(substr)
    exp_result = 3
    assert count_result == exp_result
Exemplo n.º 2
0
def test_count_with_non_string():
    seq = BioSeq('acgttccgccgggg')
    substr = 123
    with pytest.raises(TypeError):
        seq.count(substr)