Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update some tests #130

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install --prefer-binary --editable .[dev]
python -m pip install --prefer-binary --editable .[fast]
if [ $(python -c "import sys; print(sys.version[:3])") != 3.4 ]; then python -m pip install --prefer-binary --editable .[fast]; fi
- name: Lint with flake8
run: |
Expand Down
2 changes: 1 addition & 1 deletion orbit_predictor/predictors/_minimize.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from math import sqrt, copysign, isnan

from scipy.optimize.optimize import OptimizeResult, _status_message
from scipy.optimize._optimize import OptimizeResult, _status_message

inf = float("inf")

Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ logassert
mock
pytest
pytest-cov==2.5.0
pytest-benchmark
requests>=2.9.1
sgp4>=1.4
numpy
Expand Down
8 changes: 3 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,12 @@
'numpy>=1.8.2',
'sgp4>=2.5',
'requests',
'numba>=0.38',
'scipy>=0.16',
],
extras_require={
"fast": [
"numba>=0.38",
"scipy>=0.16",
],
"dev": [
"hypothesis<5.0.0",
"hypothesis",
"flake8",
"hypothesis[datetime]",
"mock",
Expand Down
4 changes: 3 additions & 1 deletion tests/test_predictors.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import datetime as dt
import importlib.util

from hypothesis import given
from hypothesis import given, settings
from hypothesis.strategies import datetimes, composite, floats
from hypothesis import HealthCheck
import pytest

from orbit_predictor.constants import R_E_KM
Expand Down Expand Up @@ -70,6 +71,7 @@ def test_get_normal_vector_zero_inclination_always_z_aligned(predictor, when_utc
assert normal_vector[2] == 1


@settings(deadline=None, suppress_health_check=(HealthCheck.function_scoped_fixture,))
@given(datetimes())
def test_get_beta_always_between_m_90_and_90(non_sun_synchronous, when_utc):
assert -90 <= non_sun_synchronous.get_beta(when_utc) <= 90
Expand Down
Loading