Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
#!/usr/bin/python
from amuse.community.agama.interface import Agama
from amuse.units import *
from amuse.test.amusetest import TestWithMPI
from amuse.ic.plummer import new_plummer_model
class AgamaInterfaceTests(TestWithMPI):
def test1(self):
M=10.
a=2.
x=1.
y=2.
z=3.
r=(x*x+y*y+z*z)**0.5
instance = Agama(type="Dehnen",
mass=M|generic_unit_system.mass, scaleRadius=a|generic_unit_system.length)
result=instance.get_potential_at_point(
0.|generic_unit_system.length,
x |generic_unit_system.length,
y |generic_unit_system.length,
z |generic_unit_system.length)
self.assertAlmostEqual(result.value_in(