diff --git a/rebound/tests/test_boundary.py b/rebound/tests/test_boundary.py index c80d392bd..7c653fe65 100644 --- a/rebound/tests/test_boundary.py +++ b/rebound/tests/test_boundary.py @@ -4,20 +4,22 @@ class TestBoundary(unittest.TestCase): def test_open(self): - sim = rebound.Simulation() - sim.boundary = "open" - sim.configure_box(10.) - sim.add(m=0.1,x=1., vx=5.0) - sim.add(m=0.1,x=-1., vx=-5.0) - sim.add(m=0.1,y=1., vx=6.0) - sim.add(m=0.1,x=-1., y=-1., vx=-3., vy=-3.) - sim.add(m=0.1,z=1., vz=5.0) - sim.add(m=0.1,z=-1., vz=-5.0) - self.assertEqual(sim.N,6) - sim.integrate(1.) - self.assertEqual(sim.N,1) - with self.assertRaises(rebound.NoParticles): - sim.integrate(2.) + for gravity in ["basic", "tree"]: + sim = rebound.Simulation() + sim.boundary = "open" + sim.gravity = gravity + sim.configure_box(10.) + sim.add(m=0.1,x=1., vx=5.0) + sim.add(m=0.1,x=-1., vx=-5.0) + sim.add(m=0.1,y=1., vx=6.0) + sim.add(m=0.1,x=-1., y=-1., vx=-3., vy=-3.) + sim.add(m=0.1,z=1., vz=5.0) + sim.add(m=0.1,z=-1., vz=-5.0) + self.assertEqual(sim.N,6) + sim.integrate(1.) + self.assertEqual(sim.N,1) + with self.assertRaises(rebound.NoParticles): + sim.integrate(2.) def test_periodic(self): sim = rebound.Simulation()