コード例 #1
0
ファイル: test_alb_api.py プロジェクト: cbird808/BuddySuite
def test_reverse_transcribe_exceptions(alb_resources):  # Asserts that a TypeError will be thrown if user inputs protein
    with pytest.raises(TypeError) as e:
        Alb.rna2dna(alb_resources.get_one("o p s"))
    assert "TypeError: RNA sequence required, not IUPACProtein()." in str(e)

    with pytest.raises(TypeError) as e:
        Alb.rna2dna(alb_resources.get_one("o d s"))
    assert "TypeError: RNA sequence required, not IUPACAmbiguousDNA()." in str(e)
コード例 #2
0
ファイル: test_alb_api.py プロジェクト: cbird808/BuddySuite
def test_transcribe(alb_resources, hf, key, d2r_hash, r2d_hash):
    tester = Alb.dna2rna(alb_resources.get_one(key))
    assert hf.buddy2hash(tester) == d2r_hash
    tester = Alb.rna2dna(tester)
    assert hf.buddy2hash(tester) == r2d_hash