Skip to content

Commit

Permalink
Issue #3: More linting in unit tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
MattClarkson committed May 28, 2020
1 parent 6663b3f commit 91c7215
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/video/test_hand_eye.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import sksurgeryimage.calibration.charuco_plus_chessboard_point_detector as chpd
import sksurgerycalibration.video as vidcal


def test_set_model2hand_arrays():
"""Test that model2hand arrays are set without raising an error"""
chessboard_detector = pd.ChessboardPointDetector((14, 10), 3, (1, 1))
Expand All @@ -27,6 +28,7 @@ def test_set_model2hand_arrays():

stereo_calib.tracking_data.set_model2hand_arrays()


def load_images_from_glob(glob_pattern):
""" Load images from files based on a glob pattern. """
images = []
Expand All @@ -49,6 +51,7 @@ def load_tracking_from_glob(glob_pattern):

return tracking


def test_handeye_calibration_mono():
""" Load mono data (only using left channel) and tracking, do video and
handeye calibration, compare results against expected values.
Expand Down Expand Up @@ -99,6 +102,7 @@ def test_handeye_calibration_mono():
assert proj_err == pytest.approx(expected_reproj_error, rel=1e-4)
assert recon_err == pytest.approx(expected_recon_error, rel=1e-4)


def test_handeye_calibration_stereo():
""" Load Stereo data and tracking, do video and
handeye calibration, compare results against expected values.
Expand Down Expand Up @@ -153,6 +157,7 @@ def test_handeye_calibration_stereo():
assert proj_err == pytest.approx(expected_reproj_error, rel=1e-4)
assert recon_err == pytest.approx(expected_recon_error, rel=1e-4)


def test_load_data_stereo_calib():
""" Load tracking and image data from test directory. """
chessboard_detector = pd.ChessboardPointDetector((14, 10), 3, (1, 1))
Expand Down

0 comments on commit 91c7215

Please sign in to comment.