def test_n_neg(): """Perform unit tests on test-driven_dev.n_neg.""" assert test_driven_dev.n_neg('E') == 1 assert test_driven_dev.n_neg('D') == 1 assert test_driven_dev.n_neg('') == 0 assert test_driven_dev.n_neg('ACKLWTTAE') == 1 assert test_driven_dev.n_neg('DDDDEEEE') == 8 assert test_driven_dev.n_neg('acklwttae') == 1
def test_n_neg_for_invalid_amino_acid(): with pytest.raises(RuntimeError) as excinfo: test_driven_dev.n_neg('Z') excinfo.match("Z is not a valid amino acid")
def test_n_neg_for_lower_case_sequences(): assert test_driven_dev.n_neg('acklwttae') == 1
def test_n_neg_for_longer_sequences(): assert test_driven_dev.n_neg('ACKLWTTAE') == 1 assert test_driven_dev.n_neg('DDDDEEEE') == 8
def test_n_neg_for_empty_sequence(): assert test_driven_dev.n_neg('') == 0
def test_n_neg_for_single_E_or_D(): """Perform unit tests on n_neg.""" assert test_driven_dev.n_neg('E') == 1 assert test_driven_dev.n_neg('D') == 1