def testIndex(self): chain = Chain(self.a[:]) index_g = chain.data.index(Hetero('g')) self.assertEqual(chain.index('g'), index_g) chain = Chain(self.b[:]) index_c = chain.data.index(Hetero('c')) self.assertEqual(chain.index('c'), index_c) chain = Chain(self.c[:]) index_met = chain.data.index(Hetero('met')) self.assertEqual(chain.index('met'), index_met)
def testIndex(self): chain = Chain(self.a[:]) index_g = chain.data.index(Hetero("g")) self.assertEqual(chain.index("g"), index_g) chain = Chain(self.b[:]) index_c = chain.data.index(Hetero("c")) self.assertEqual(chain.index("c"), index_c) chain = Chain(self.c[:]) index_met = chain.data.index(Hetero("met")) self.assertEqual(chain.index("met"), index_met)