AndrewAnnex / SpiceyPy

SpiceyPy: a Pythonic Wrapper for the SPICE Toolkit.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug in test_oscelt and test_oscltx

fyellin opened this issue · comments

The functions test_oscelt and test_oscltx both contain the lines:

mass_earth = spice.bodvrd("EARTH", "GM", 1)
... mass_earth[0]...

However spice.bodvrd returns a tuple of (length, array_of_values). So in both cases mass_earth[0] is the integer 1, which is probably not what this test is supposed to do.

At this point oscelt and oscltx are respectively called with the wrong values, and returns the correct result for those wrong values. We then check that the correct wrong values are returned.

These tests need to be re-written to use

_len, mass_earth = spice_bodvrd("EARTH", "GM", 1)

and the correct result for the actual mass of the earth needs to be used.

@fyellin thanks for the issue report and confirmed thats a issue, do you want to contribute a pull request with the changes?

Sure. I'll fix.

#469 was merged, thanks @fyellin