Skip to content

Commit

Permalink
Add tests catching arrays with different shapes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mayitzin committed Oct 23, 2024
1 parent 238d4b8 commit e108694
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/test_estimators.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,10 @@ def test_wrong_input_vectors(self):
self.assertRaises(TypeError, ahrs.filters.AQUA, acc=True, mag=[1.0, 2.0, 3.0])
self.assertRaises(ValueError, ahrs.filters.AQUA, acc=[1.0, 2.0], mag=[2.0, 3.0, 4.0])
self.assertRaises(ValueError, ahrs.filters.AQUA, acc=[1.0, 2.0, 3.0, 4.0], mag=[2.0, 3.0, 4.0, 5.0])
self.assertRaises(TypeError, ahrs.filters.AQUA, acc='self.accelerometers', mag=self.magnetometers)
self.assertRaises(TypeError, ahrs.filters.AQUA, acc=self.accelerometers, mag='self.magnetometers')
self.assertRaises(ValueError, ahrs.filters.AQUA, acc=[[1., 2., 3.]], mag=self.magnetometers)
self.assertRaises(ValueError, ahrs.filters.AQUA, acc=self.accelerometers, mag=[[1., 2., 3.]])

def test_wrong_input_vector_types(self):
self.assertRaises(TypeError, ahrs.filters.AQUA, acc=['1.0', 2.0, 3.0], mag=[2.0, 3.0, 4.0])
Expand Down

0 comments on commit e108694

Please sign in to comment.