summaryrefslogtreecommitdiff
path: root/iss/tests/test_predictions.py
diff options
context:
space:
mode:
authorYuval Adam <_@yuv.al>2020-09-24 21:54:20 +0300
committerYuval Adam <_@yuv.al>2020-09-24 21:54:20 +0300
commit5225a7263341308c3ec7429f8275afb34134a831 (patch)
tree915439a4f2087ed03aec4655ee1ab19a1cbac8c3 /iss/tests/test_predictions.py
parentdf526f8cf7fa4233e97b925b40daf51d4924cb18 (diff)
Fix test data from static TLE file
Diffstat (limited to 'iss/tests/test_predictions.py')
-rw-r--r--iss/tests/test_predictions.py28
1 files changed, 21 insertions, 7 deletions
diff --git a/iss/tests/test_predictions.py b/iss/tests/test_predictions.py
index 27fc667..4c55f5b 100644
--- a/iss/tests/test_predictions.py
+++ b/iss/tests/test_predictions.py
@@ -1,7 +1,11 @@
+from pathlib import Path
from skyfield.api import Topos
from ..predictions import Predictions
+DATA_DIR = Path(__file__).parent / "data"
+STATIONS = DATA_DIR / "stations.txt"
+
def test_get_timescales():
days = 5
@@ -29,15 +33,25 @@ def test_get_location():
def test_get_predictions():
start = 2459117.245895914
- p = Predictions(lat=32.0853, lng=34.7817, tz="Asia/Jerusalem", start=start)
+ p = Predictions(
+ lat=32.0853, lng=34.7817, tz="Asia/Jerusalem", start=start, tle_file=STATIONS
+ )
preds = p.get_predictions()
- assert len(preds) == 17
+ assert len(preds) == 16
assert preds[0] == [
- "2020-09-24T21:31:09Z",
- "2020-09-24T21:32:35Z",
- "2020-09-24T21:34:02Z",
+ "2020-09-24T21:31:31Z",
+ "2020-09-24T21:32:57Z",
+ "2020-09-24T21:34:24Z",
]
- p = Predictions(lat=32.0853, lng=34.7817, tz="Asia/Jerusalem", start=start, days=5)
+ p = Predictions(
+ lat=32.0853,
+ lng=34.7817,
+ tz="Asia/Jerusalem",
+ altitude=0,
+ start=start,
+ days=5,
+ tle_file=STATIONS,
+ )
preds = p.get_predictions()
- assert len(preds) == 8
+ assert len(preds) == 39