@pytest.mark.parametrize('test_dict', Mag14_test)
def test_comp_point_coordinate(self, test_dict):
    'Check that the point coordinates are correct'
    test_obj = test_dict['test_obj']
    point_dict = test_obj.slot._comp_point_coordinate()
    Z1 = point_dict['Z1']
    Z2 = point_dict['Z2']
    Z3 = point_dict['Z3']
    Z4 = point_dict['Z4']
    ZM0 = point_dict['ZM0']
    ZM1 = point_dict['ZM1']
    ZM2 = point_dict['ZM2']
    ZM3 = point_dict['ZM3']
    ZM4 = point_dict['ZM4']
    W0 = test_obj.slot.W0
    H0 = test_obj.slot.H0
    Wmag = test_obj.slot.Wmag
    Hmag = test_obj.slot.Hmag
    Rbo = test_obj.get_Rbo()
    assert (abs(Z1) == pytest.approx(Rbo, rel=DELTA))
    assert (angle(Z1) == pytest.approx(((- W0) / 2), rel=DELTA))
    assert (abs(Z4) == pytest.approx(Rbo, rel=DELTA))
    assert (angle(Z4) == pytest.approx((W0 / 2), rel=DELTA))
    if test_obj.is_internal:
        assert (abs(Z2) == pytest.approx((Rbo - H0), rel=DELTA))
        assert (abs(Z3) == pytest.approx((Rbo - H0), rel=DELTA))
    else:
        assert (abs(Z3) == pytest.approx((Rbo + H0), rel=DELTA))
        assert (abs(Z2) == pytest.approx((Rbo + H0), rel=DELTA))
    assert (angle(Z2) == pytest.approx(((- W0) / 2), rel=DELTA))
    assert (angle(Z3) == pytest.approx((W0 / 2), rel=DELTA))
    assert (angle(ZM1) == pytest.approx(angle(ZM2), rel=DELTA))
    assert (angle(ZM1) == pytest.approx(((- Wmag) / 2), rel=DELTA))
    assert (angle(ZM3) == pytest.approx(angle(ZM4), rel=DELTA))
    assert (angle(ZM3) == pytest.approx((Wmag / 2), rel=DELTA))
    if test_obj.is_internal:
        assert (ZM0 == pytest.approx(((Rbo + Hmag) - H0), rel=DELTA))
    else:
        assert (ZM0 == pytest.approx(((Rbo - Hmag) + H0), rel=DELTA))
Check that the point coordinates are correct
@pytest.mark.parametrize('test_dict', Mag14_test)
def test_comp_point_coordinate(self, test_dict):
    
    test_obj = test_dict['test_obj']
    point_dict = test_obj.slot._comp_point_coordinate()
    Z1 = point_dict['Z1']
    Z2 = point_dict['Z2']
    Z3 = point_dict['Z3']
    Z4 = point_dict['Z4']
    ZM0 = point_dict['ZM0']
    ZM1 = point_dict['ZM1']
    ZM2 = point_dict['ZM2']
    ZM3 = point_dict['ZM3']
    ZM4 = point_dict['ZM4']
    W0 = test_obj.slot.W0
    H0 = test_obj.slot.H0
    Wmag = test_obj.slot.Wmag
    Hmag = test_obj.slot.Hmag
    Rbo = test_obj.get_Rbo()
    assert (abs(Z1) == pytest.approx(Rbo, rel=DELTA))
    assert (angle(Z1) == pytest.approx(((- W0) / 2), rel=DELTA))
    assert (abs(Z4) == pytest.approx(Rbo, rel=DELTA))
    assert (angle(Z4) == pytest.approx((W0 / 2), rel=DELTA))
    if test_obj.is_internal:
        assert (abs(Z2) == pytest.approx((Rbo - H0), rel=DELTA))
        assert (abs(Z3) == pytest.approx((Rbo - H0), rel=DELTA))
    else:
        assert (abs(Z3) == pytest.approx((Rbo + H0), rel=DELTA))
        assert (abs(Z2) == pytest.approx((Rbo + H0), rel=DELTA))
    assert (angle(Z2) == pytest.approx(((- W0) / 2), rel=DELTA))
    assert (angle(Z3) == pytest.approx((W0 / 2), rel=DELTA))
    assert (angle(ZM1) == pytest.approx(angle(ZM2), rel=DELTA))
    assert (angle(ZM1) == pytest.approx(((- Wmag) / 2), rel=DELTA))
    assert (angle(ZM3) == pytest.approx(angle(ZM4), rel=DELTA))
    assert (angle(ZM3) == pytest.approx((Wmag / 2), rel=DELTA))
    if test_obj.is_internal:
        assert (ZM0 == pytest.approx(((Rbo + Hmag) - H0), rel=DELTA))
    else:
        assert (ZM0 == pytest.approx(((Rbo - Hmag) + H0), rel=DELTA))