Документ взят из кэша поисковой машины. Адрес оригинального документа : http://kodomo.fbb.msu.ru/hg/allpy/file/45da1d3a60c3/test/test_dna.py
Дата изменения: Unknown
Дата индексирования: Mon Feb 4 07:07:39 2013
Кодировка:
allpy: 45da1d3a60c3 test/test_dna.py

allpy

view test/test_dna.py @ 1116:45da1d3a60c3

pair_cores/web: add note about support by Ministry of Education and Science
author Boris Nagaev <bnagaev@gmail.com>
date Wed, 28 Nov 2012 00:35:35 +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()