Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
fix: set times are now correct
- Loading branch information
Jérôme Deuchnord
committed
Nov 18, 2019
1 parent
5f74b08
commit 82bdc70
Showing
3 changed files
with
25 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
from .dumper import * | ||
from .dumper import * | ||
from .ephemerides import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import unittest | ||
from kosmorrolib.ephemerides import EphemeridesComputer | ||
from kosmorrolib.core import get_skf_objects | ||
from kosmorrolib.data import Star, Position | ||
from datetime import date | ||
|
||
|
||
class EphemeridesComputerTestCase(unittest.TestCase): | ||
def test_get_ephemerides_for_aster_returns_correct_hours(self): | ||
position = Position(0, 0) | ||
position.observation_planet = get_skf_objects()['earth'] | ||
star = EphemeridesComputer.get_asters_ephemerides_for_aster(Star('Sun', skyfield_name='sun'), | ||
date=date(2019, 11, 18), | ||
position=position) | ||
|
||
self.assertEqual('2019-11-18T05:41:31Z', star.ephemerides.rise_time.utc_iso()) | ||
self.assertEqual('2019-11-18T11:45:02Z', star.ephemerides.culmination_time.utc_iso()) | ||
self.assertEqual('2019-11-18T17:48:39Z', star.ephemerides.set_time.utc_iso()) | ||
|
||
|
||
if __name__ == '__main__': | ||
unittest.main() |