Esempio n. 1
0
def test7_all_negative():
    """Test 7"""
    data = math_data()
    x = -4
    y = -3
    p_x = -2
    p_y = -1
    assert [get_pdot_x(x, y, p_y),
            get_pdot_y(x, y, p_x)] == pytest.approx(data["test7"])
Esempio n. 2
0
def test6_all_positive():
    """Test 6"""
    data = math_data()
    x = 1
    y = 2
    p_x = 3
    p_y = 4
    assert [get_pdot_x(x, y, p_y),
            get_pdot_y(x, y, p_x)] == pytest.approx(data["test6"])
Esempio n. 3
0
def test5_py_negative():
    """Test 5"""
    data = math_data()
    x = 0
    y = 0
    p_x = 0
    p_y = -5
    assert [get_pdot_x(x, y, p_y),
            get_pdot_y(x, y, p_x)] == pytest.approx(data["test5"])
Esempio n. 4
0
def test4_px_positive():
    """Test 4"""
    data = math_data()
    x = 0
    y = 0
    p_x = 2
    p_y = 0
    assert [get_pdot_x(x, y, p_y),
            get_pdot_y(x, y, p_x)] == pytest.approx(data["test4"])
Esempio n. 5
0
def test1_zeros():
    """Test 1"""
    data = math_data()
    x = 0
    y = 0
    p_x = 0
    p_y = 0
    assert [get_pdot_x(x, y, p_y),
            get_pdot_y(x, y, p_x)] == pytest.approx(data["test1"])
Esempio n. 6
0
def test8_all_mixed():
    """Test 8"""
    data = math_data()
    x = -1
    y = 1
    p_x = -3
    p_y = 4
    assert [get_pdot_x(x, y, p_y),
            get_pdot_y(x, y, p_x)] == pytest.approx(data["test8"])