Документ взят из кэша поисковой машины. Адрес оригинального документа : http://kodomo.fbb.msu.ru/hg/allpy/file/b556c96c6719/test/test_dna.py
Дата изменения: Unknown
Дата индексирования: Wed Apr 13 12:19:34 2016
Кодировка:
allpy: b556c96c6719 test/test_dna.py

allpy

view test/test_dna.py @ 1168:b556c96c6719

blocks3d/www Makefile: never check certificates of github, they are too confusing for wget
author Daniil Alexeyevsky <dendik@kodomo.fbb.msu.ru>
date Mon, 26 May 2014 17:20:29 +0400
parents 73f57a30831f
children
line source
1 from nose.tools import raises
2 from allpy import dna
4 def test_dna():
5 s = dna.Sequence.from_string("AGATCGGAAGAGC", name='seq1')
6 s1 = s.reverse_complemented()
7 assert s1.name == "seq1'"
8 assert str(s1) == "GCTCTTCCGATCT"
9 assert str(s.translated()) == "RSEE"
11 del s[12:]
12 s += dna.Sequence.from_string("TGA")
13 assert str(s.translated()) == "RSEE"
15 @raises(AssertionError)
16 def test_translation_stop():
17 s = dna.Sequence.from_string("TGATCGGAAGAGC")
18 print s.translated()