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
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
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
def test_shorten_AA_substitute_fail_is_letter(self): assert(residue_and_atom.shorten_AA("glu30", substitute_fail='g') == 'g')
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')
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')