コード例 #1
0
ファイル: test_Apex.py プロジェクト: cmeeren/apexpy
def test_get_apex_invalid_lat():
    A = Apex(date=2000, refh=300)
    with pytest.raises(ValueError):
        A.get_apex(91)
    with pytest.raises(ValueError):
        A.get_apex(-91)
    A.get_apex(90)
    A.get_apex(-90)

    assert_allclose(A.get_apex(90+1e-5), A.get_apex(90), rtol=0, atol=1e-8)
コード例 #2
0
def test_get_apex_invalid_lat():
    A = Apex(date=2000, refh=300)
    with pytest.raises(ValueError):
        A.get_apex(91)
    with pytest.raises(ValueError):
        A.get_apex(-91)
    A.get_apex(90)
    A.get_apex(-90)

    assert_allclose(A.get_apex(90 + 1e-5), A.get_apex(90), rtol=0, atol=1e-8)
コード例 #3
0
ファイル: test_Apex.py プロジェクト: cmeeren/apexpy
def test_get_apex():
    A = Apex(date=2000, refh=300)
    assert_allclose(A.get_apex(10), 507.409702543805)
    assert_allclose(A.get_apex(60), 20313.026999999987)
コード例 #4
0
def test_get_apex():
    apex_out = Apex(date=2000, refh=300)
    assert_allclose(apex_out.get_apex(10), 507.409702543805)
    assert_allclose(apex_out.get_apex(60), 20313.026999999987)