summaryrefslogtreecommitdiff
path: root/iss/tests/test_predictions.py
diff options
context:
space:
mode:
authorYuval Adam <_@yuv.al>2020-09-24 22:39:05 +0300
committerYuval Adam <_@yuv.al>2020-09-24 22:39:05 +0300
commitff8aeca0330b5d90a36c37eb62ece2d8b020f307 (patch)
treeff1c61996b5686d2e252bf29213d2d4289bbb7dc /iss/tests/test_predictions.py
parent78099db917289a3100ea0ee7558da5627582fc6f (diff)
Continue predictions split
Diffstat (limited to 'iss/tests/test_predictions.py')
-rw-r--r--iss/tests/test_predictions.py19
1 files changed, 13 insertions, 6 deletions
diff --git a/iss/tests/test_predictions.py b/iss/tests/test_predictions.py
index 035ab9a..3fbf12d 100644
--- a/iss/tests/test_predictions.py
+++ b/iss/tests/test_predictions.py
@@ -30,7 +30,7 @@ def test_get_location():
assert topos.longitude.degrees == tlv.longitude.degrees
-def test_get_predictions():
+def test_get_prediction_events():
start = 2459117.245895914
p = Predictions(
@@ -38,11 +38,8 @@ def test_get_predictions():
)
preds = p.get_prediction_events()
assert len(preds) == 16
- assert preds[0] == [
- "2020-09-24T21:31:31Z",
- "2020-09-24T21:32:57Z",
- "2020-09-24T21:34:24Z",
- ]
+ preds = [[t.ut1 for t in pred] for pred in preds]
+ assert preds[0] == [2459117.396875682, 2459117.39787489, 2459117.3988819383]
p = Predictions(
lat=32.0853,
@@ -55,3 +52,13 @@ def test_get_predictions():
)
preds = p.get_prediction_events()
assert len(preds) == 39
+
+
+def test_get_predictions():
+ start = 2459117.245895914
+ p = Predictions(
+ lat=32.0853, lng=34.7817, tz="Asia/Jerusalem", start=start, tle_file=STATIONS
+ )
+ preds = p.get_predictions()
+ assert len(preds) == 16
+ assert preds[0]["culminate"].ut1 == 2459117.39787489