Skip to content

Commit

Permalink
HYDRA-815 : Adjust image diff thresholds testDirectionalLights
Browse files Browse the repository at this point in the history
  • Loading branch information
debloip-adsk committed Jan 24, 2024
1 parent 86d1d1a commit c4583b8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions test/lib/mayaUsd/render/mayaToHydra/testDirectionalLights.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ class TestDirectionalLights(mtohUtils.MtohTestCase): #Subclassing mtohUtils.Mtoh
# MayaHydraBaseTestCase.setUpClass requirement.
_file = __file__

IMAGE_DIFF_FAIL_THRESHOLD = 0.5
IMAGE_DIFF_FAIL_PERCENT = 1

def activeModelPanel(self):
"""Return the model panel that will be used for playblasting etc..."""
for panel in cmds.getPanel(type="modelPanel"):
Expand All @@ -42,7 +45,7 @@ def test_DirectionalLights(self):
"testDirectionalLights",
"UsdStageWithSphereMatXStdSurf.ma")
cmds.refresh()
self.assertSnapshotClose("directionalLight.png", 1, 1)
self.assertSnapshotClose("directionalLight.png", self.IMAGE_DIFF_FAIL_THRESHOLD, self.IMAGE_DIFF_FAIL_PERCENT)

# Delete the directional Light
cmds.delete('directionalLight1')
Expand All @@ -52,7 +55,7 @@ def test_DirectionalLights(self):
panel = self.activeModelPanel()
cmds.modelEditor(panel, edit=True, displayLights="default")
cmds.refresh()
self.assertSnapshotClose("defaultLight.png", 1, 1)
self.assertSnapshotClose("defaultLight.png", self.IMAGE_DIFF_FAIL_THRESHOLD, self.IMAGE_DIFF_FAIL_PERCENT)

if __name__ == '__main__':
fixturesUtils.runTests(globals())

0 comments on commit c4583b8

Please sign in to comment.