Ejemplo n.º 1
0
 def test_shorten_AA_substitute_fail_is_string_of_length_greater_than_1(self):
     failed_assertion = False
     try:
         residue_and_atom.shorten_AA("glu30", substitute_fail='glutamine')
     except ValueError:
         failed_assertion = True
     assert failed_assertion
Ejemplo n.º 2
0
 def test_shorten_AA_substitute_fail_is_none(self):
     failed_assertion = False
     try:
         residue_and_atom.shorten_AA("glu30")
     except KeyError:
         failed_assertion = True
     assert failed_assertion
Ejemplo n.º 3
0
 def test_shorten_AA_substitute_fail_is_int(self):
     failed_assertion = False
     try:
         residue_and_atom.shorten_AA("glu30", substitute_fail=1)
     except ValueError:
         failed_assertion = True
     assert failed_assertion
Ejemplo n.º 4
0
 def test_shorten_AA_substitute_fail_is_letter(self):
     assert(residue_and_atom.shorten_AA("glu30", substitute_fail='g') == 'g')
Ejemplo n.º 5
0
 def test_shorten_AA(self):
     assert(residue_and_atom.shorten_AA("GLU30") == 'E')
     assert(residue_and_atom.shorten_AA(self.geom.top.residue(1)) == 'V')
Ejemplo n.º 6
0
 def test_shorten_AA_keep_index_is_true(self):
     assert(residue_and_atom.shorten_AA("GLU30", keep_index=True) == 'E30')
     assert(residue_and_atom.shorten_AA("glu30",substitute_fail='E',keep_index=True) == 'E30')