Skip to content

Commit

Permalink
Skip liver overlay test on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
tdowrick committed Jun 19, 2020
1 parent 0224c91 commit ee14711
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions tests/camera/test_liver_overlay.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ def test_overlay_liver_points(setup_vtk_overlay_window):
if not os.path.exists(output_name):
os.mkdir(output_name)

# We aren't using 'proper' hardware rendering on GitHub CI, so skip
in_github_ci = os.environ.get('CI')
if in_github_ci:
pytest.skip("Don't run rendering test on GitHub CI")

intrinsics_file = 'tests/data/liver/calib.left.intrinsics.txt'
intrinsics = np.loadtxt(intrinsics_file)

Expand Down Expand Up @@ -110,15 +115,7 @@ def test_overlay_liver_points(setup_vtk_overlay_window):
reference_image = cv2.imread('tests/data/liver/fig06_case1b_overlay.png')
rendered_image = cv2.imread('tests/output/fig06_case1b_overlay.png')

# We aren't using 'proper' hardware rendering on GitHub CI, so results
# might be a bit different from a local run.
in_github_ci = os.environ.get('CI')
if in_github_ci:
atol = 5
else:
atol = 1

assert np.allclose(reference_image, rendered_image, atol=atol)
assert np.allclose(reference_image, rendered_image, atol=1)

# Just for interactive testing.
# app.exec_()

0 comments on commit ee14711

Please sign in to comment.