def test_Switching(self): "test that a Switching can be converted to a Nuisance" n=Switching.setup_particle(IMP.Particle(self.m)) n.set_lower(-10) n.set_upper(10) self.assertTrue(Nuisance.particle_is_instance(n.get_particle())) self.assertFalse(Switching.particle_is_instance(n.get_particle()))
def test_Nuisance(self): "test that a Nuisance can be converted to a Switching" n=Nuisance.setup_particle(IMP.Particle(self.m),0.5) n.set_lower(0) n.set_upper(1) self.assertTrue(Switching.particle_is_instance(n.get_particle()))