Skip to content

Commit

Permalink
Merge pull request #283 from SeaifanAladdin/SCF_C
Browse files Browse the repository at this point in the history
Increased test coverage for SCFPotential: axisymmetric case
  • Loading branch information
jobovy committed Aug 5, 2016
2 parents 6037e50 + b45695e commit 9828010
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions nose/test_scf.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,20 @@ def test_coeffs_Asin_L_M_notLowerTriangular():
raise Exception("Expected RuntimeWarning")
except RuntimeWarning:
pass


def testAxi_phiIsNone():
R = 1; z = 0; phi = 1.1;
scf = SCFPotential()
assert scf(R,z,None) == scf(R,z,phi), "The axisymmetric potential does not work at phi=None"
assert scf.dens(R,z,None) == scf.dens(R,z,phi), "The axisymmetric density does not work at phi=None"
assert scf.Rforce(R,z,None) == scf.Rforce(R,z,phi), "The axisymmetric Rforce does not work at phi=None"
assert scf.zforce(R,z,None) == scf.zforce(R,z,phi), "The axisymmetric zforce does not work at phi=None"
assert scf.phiforce(R,z,None) == scf.phiforce(R,z,phi), "The axisymmetric phiforce does not work at phi=None"




##Tests user inputs as arrays


def testArray_RArray():
scf = SCFPotential()
Expand Down

0 comments on commit 9828010

Please sign in to comment.