diff --git a/test/lib/mayaUsd/render/mayaToHydra/testDirectionalLights.py b/test/lib/mayaUsd/render/mayaToHydra/testDirectionalLights.py index b62d0284a7..d1140397ef 100644 --- a/test/lib/mayaUsd/render/mayaToHydra/testDirectionalLights.py +++ b/test/lib/mayaUsd/render/mayaToHydra/testDirectionalLights.py @@ -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"): @@ -42,13 +45,9 @@ def test_DirectionalLights(self): "testDirectionalLights", "UsdStageWithSphereMatXStdSurf.ma") cmds.refresh() - self.assertSnapshotClose("directionalLight.png", None, None) - #Do a view fit --Test removed as on Linux the fit doesn't produce the same result as on Windows and OSX. - #cmds.viewFit('persp') - #cmds.refresh() - #self.assertSnapshotClose("directionalLightFit.png", None, None) + self.assertSnapshotClose("directionalLight.png", self.IMAGE_DIFF_FAIL_THRESHOLD, self.IMAGE_DIFF_FAIL_PERCENT) - #delete the directional Light + # Delete the directional Light cmds.delete('directionalLight1') cmds.refresh() @@ -56,7 +55,7 @@ def test_DirectionalLights(self): panel = self.activeModelPanel() cmds.modelEditor(panel, edit=True, displayLights="default") cmds.refresh() - self.assertSnapshotClose("defaultLight.png", None, None) + self.assertSnapshotClose("defaultLight.png", self.IMAGE_DIFF_FAIL_THRESHOLD, self.IMAGE_DIFF_FAIL_PERCENT) if __name__ == '__main__': fixturesUtils.runTests(globals()) diff --git a/test/lib/mayaUsd/render/mayaToHydra/testSceneBrowser.py b/test/lib/mayaUsd/render/mayaToHydra/testSceneBrowser.py index ffcd33d1f9..34030fc50f 100644 --- a/test/lib/mayaUsd/render/mayaToHydra/testSceneBrowser.py +++ b/test/lib/mayaUsd/render/mayaToHydra/testSceneBrowser.py @@ -17,6 +17,7 @@ import fixturesUtils import mtohUtils +import platform import unittest from testUtils import PluginLoaded @@ -43,8 +44,10 @@ def setupScene(self): cmds.directionalLight(name="MayaDirectionalLight") cmds.refresh() - @unittest.skipUnless(mtohUtils.checkForMayaUsdPlugin() and mtohUtils.checkForPlugin(SCENE_BROWSER_TEST_PLUGIN_NAME), - f'Requires mayaUSD and {SCENE_BROWSER_TEST_PLUGIN_NAME} plugins.') + @unittest.skipUnless(mtohUtils.checkForMayaUsdPlugin() and mtohUtils.checkForPlugin(SCENE_BROWSER_TEST_PLUGIN_NAME) + and platform.system() != "Darwin", + f'Requires mayaUSD and {SCENE_BROWSER_TEST_PLUGIN_NAME} plugins. ' + 'Currently also disabled on OSX.') def test_SceneBrowser(self): self.setupScene() with PluginLoaded(self.SCENE_BROWSER_TEST_PLUGIN_NAME):