Skip to content

Commit

Permalink
test exception for projective geometry
Browse files Browse the repository at this point in the history
  • Loading branch information
olivierverdier committed Dec 31, 2016
1 parent eb57c37 commit 2d242a8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/test_interpolator.py
Expand Up @@ -47,7 +47,7 @@ def get_points_matrix(N=8, n=3, k=2):
{
'geometry': geometry.Projective(),
'points' : np.array([[1,0], [np.sqrt(0.5),np.sqrt(0.5)*1j], [0,1]]),
'boundary': (np.zeros(2, dtype='c8'), np.zeros(2, dtype='c8')),
'boundary': (None, None),
},
]

Expand All @@ -65,8 +65,11 @@ def test_control_points(interpolator, cls):
"""
Test that the spline control points are the same for the three interpolations
"""
if isinstance(interpolator['geometry'], geometry.Grassmannian) and cls == Exponential:
geo = interpolator['geometry']
if isinstance(geo, geometry.Grassmannian) and cls == Exponential:
pytest.xfail("Exponential algorithm for Grassmannian not implemented")
if isinstance(geo, geometry.Projective) and cls != Riemann:
pytest.xfail("Only Riemann for projective geometry so far")
spline = cls(interpolator['points'], make_boundaries(*interpolator['boundary']), geometry=interpolator['geometry']).compute_spline()
expected = interpolator['Rspline'].control_points
npt.assert_almost_equal(spline.control_points, expected)
Expand Down

0 comments on commit 2d242a8

Please sign in to comment.