コード例 #1
0
def test_n_neg_for_empty_sequence():
    assert seq_features.n_neg('') == 0
コード例 #2
0
def test_n_neg_for_single_E_or_D():
    """Perform unit tests on n_neg."""

    assert seq_features.n_neg('E') == 1
    assert seq_features.n_neg('D') == 1
コード例 #3
0
def test_n_neg_for_lower_case_sequences():
    assert seq_features.n_neg('acklwttae') == 1
コード例 #4
0
def test_n_neg_for_longer_sequences():
    assert seq_features.n_neg('ACKLWTTAE') == 1
    assert seq_features.n_neg('DDDDEEEE') == 8
コード例 #5
0
def test_n_neg_for_invalid_amino_acid():
    with pytest.raises(RuntimeError) as excinfo:
        seq_features.n_neg('Z')
    excinfo.match("Z is not a valid amino acid.")

    excinfo.match("Z is not a valid amino acid.")
コード例 #6
0
def test_n_neg_for_empty_sequence():
    assert sf.n_neg('') == 0