Пример #1
0
 def test_no_model(self):
     """Check access of attributes from python"""
     m = IMP.Model()
     p = IMP.Particle(m)
     ik = IMP.IntKey("hi")
     m.add_attribute(ik, p.get_index(), 1)
     self.assertEqual(m.get_attribute(ik, p.get_index()), 1)
     pisk = IMP.ParticleIndexesKey("hi")
     m.add_attribute(pisk, p.get_index(), [p.get_index()])
     self.assertEqual(m.get_attribute(pisk, p.get_index()), [p.get_index()])
     pik = IMP.ParticleIndexKey("hi")
     m.add_attribute(pik, p.get_index(), p.get_index())
     self.assertEqual(m.get_attribute(pik, p.get_index()), p.get_index())