From 31354e85cd22d97b2f6bba751822704df728944c Mon Sep 17 00:00:00 2001 From: debloip Date: Tue, 26 Mar 2024 15:44:47 -0400 Subject: [PATCH] HYDRA-861 : Adjust testRefinement and testUsdNativeInstancePicking + remove a bunch of unused imports --- .../mayaUsd/render/mayaToHydra/cpp/testMayaUsdUfeItems.py | 1 - .../mayaUsd/render/mayaToHydra/cpp/testPathInterface.py | 2 -- test/lib/mayaUsd/render/mayaToHydra/cpp/testPicking.py | 1 - .../render/mayaToHydra/cpp/testPointInstancePicking.py | 1 - .../mayaUsd/render/mayaToHydra/cpp/testPrimInstancing.py | 1 - .../mayaUsd/render/mayaToHydra/cpp/testSceneCorrectness.py | 1 - .../render/mayaToHydra/cpp/testUsdNativeInstancePicking.py | 4 +--- .../render/mayaToHydra/cpp/testUsdStageLayerMuting.py | 1 - .../cpp/testWireframeSelectionHighlightSceneIndex.py | 2 -- test/lib/mayaUsd/render/mayaToHydra/testArnoldLights.py | 1 - test/lib/mayaUsd/render/mayaToHydra/testImageDiffing.py | 7 ------- .../mayaUsd/render/mayaToHydra/testMaterialXOnNative.py | 1 - .../lib/mayaUsd/render/mayaToHydra/testMayaDisplayModes.py | 1 - test/lib/mayaUsd/render/mayaToHydra/testMayaLights.py | 1 - test/lib/mayaUsd/render/mayaToHydra/testMayaUsdAPIUsage.py | 1 - test/lib/mayaUsd/render/mayaToHydra/testMtohBasicRender.py | 5 ----- test/lib/mayaUsd/render/mayaToHydra/testMtohDagChanges.py | 3 --- .../mayaUsd/render/mayaToHydra/testNewSceneWithStage.py | 2 -- test/lib/mayaUsd/render/mayaToHydra/testRefinement.py | 4 +--- test/lib/mayaUsd/render/mayaToHydra/testSceneBrowser.py | 1 - test/lib/mayaUsd/render/mayaToHydra/testStageAddPrim.py | 5 ----- .../render/mayaToHydra/testStagePayloadsReferences.py | 1 - test/lib/mayaUsd/render/mayaToHydra/testStageVariants.py | 2 -- test/lib/mayaUsd/render/mayaToHydra/testTransforms.py | 2 -- test/lib/mayaUsd/render/mayaToHydra/testUSDLights.py | 1 - 25 files changed, 2 insertions(+), 50 deletions(-) diff --git a/test/lib/mayaUsd/render/mayaToHydra/cpp/testMayaUsdUfeItems.py b/test/lib/mayaUsd/render/mayaToHydra/cpp/testMayaUsdUfeItems.py index c92c159dcd..43424b45a2 100644 --- a/test/lib/mayaUsd/render/mayaToHydra/cpp/testMayaUsdUfeItems.py +++ b/test/lib/mayaUsd/render/mayaToHydra/cpp/testMayaUsdUfeItems.py @@ -16,7 +16,6 @@ import fixturesUtils import mtohUtils -import unittest from testUtils import PluginLoaded diff --git a/test/lib/mayaUsd/render/mayaToHydra/cpp/testPathInterface.py b/test/lib/mayaUsd/render/mayaToHydra/cpp/testPathInterface.py index 5ae42a2364..d7c0ac817c 100644 --- a/test/lib/mayaUsd/render/mayaToHydra/cpp/testPathInterface.py +++ b/test/lib/mayaUsd/render/mayaToHydra/cpp/testPathInterface.py @@ -23,8 +23,6 @@ from testUtils import PluginLoaded -import unittest - class TestPathInterface(mtohUtils.MayaHydraBaseTestCase): # MayaHydraBaseTestCase.setUpClass requirement. _file = __file__ diff --git a/test/lib/mayaUsd/render/mayaToHydra/cpp/testPicking.py b/test/lib/mayaUsd/render/mayaToHydra/cpp/testPicking.py index 6691bb8586..0d66f58808 100644 --- a/test/lib/mayaUsd/render/mayaToHydra/cpp/testPicking.py +++ b/test/lib/mayaUsd/render/mayaToHydra/cpp/testPicking.py @@ -16,7 +16,6 @@ import fixturesUtils import mayaUtils import mtohUtils -import unittest from testUtils import PluginLoaded diff --git a/test/lib/mayaUsd/render/mayaToHydra/cpp/testPointInstancePicking.py b/test/lib/mayaUsd/render/mayaToHydra/cpp/testPointInstancePicking.py index cb1d2c8b37..7021cc6a11 100644 --- a/test/lib/mayaUsd/render/mayaToHydra/cpp/testPointInstancePicking.py +++ b/test/lib/mayaUsd/render/mayaToHydra/cpp/testPointInstancePicking.py @@ -15,7 +15,6 @@ import maya.cmds as cmds import fixturesUtils import mtohUtils -import unittest import usdUtils import testUtils diff --git a/test/lib/mayaUsd/render/mayaToHydra/cpp/testPrimInstancing.py b/test/lib/mayaUsd/render/mayaToHydra/cpp/testPrimInstancing.py index fa79f81352..321093fb31 100644 --- a/test/lib/mayaUsd/render/mayaToHydra/cpp/testPrimInstancing.py +++ b/test/lib/mayaUsd/render/mayaToHydra/cpp/testPrimInstancing.py @@ -16,7 +16,6 @@ import fixturesUtils import mtohUtils -import unittest import testUtils from testUtils import PluginLoaded diff --git a/test/lib/mayaUsd/render/mayaToHydra/cpp/testSceneCorrectness.py b/test/lib/mayaUsd/render/mayaToHydra/cpp/testSceneCorrectness.py index 1a1593e704..7284cfecf6 100644 --- a/test/lib/mayaUsd/render/mayaToHydra/cpp/testSceneCorrectness.py +++ b/test/lib/mayaUsd/render/mayaToHydra/cpp/testSceneCorrectness.py @@ -16,7 +16,6 @@ import fixturesUtils import mtohUtils -import unittest import testUtils from testUtils import PluginLoaded diff --git a/test/lib/mayaUsd/render/mayaToHydra/cpp/testUsdNativeInstancePicking.py b/test/lib/mayaUsd/render/mayaToHydra/cpp/testUsdNativeInstancePicking.py index aa1e2d1677..77eb979385 100644 --- a/test/lib/mayaUsd/render/mayaToHydra/cpp/testUsdNativeInstancePicking.py +++ b/test/lib/mayaUsd/render/mayaToHydra/cpp/testUsdNativeInstancePicking.py @@ -15,13 +15,12 @@ import maya.cmds as cmds import fixturesUtils import mtohUtils -import unittest import usdUtils import testUtils from testUtils import PluginLoaded -class TestUsdNativeInstancePicking(mtohUtils.MtohTestCase): +class TestUsdNativeInstancePicking(mtohUtils.MayaHydraBaseTestCase): # MayaHydraBaseTestCase.setUpClass requirement. _file = __file__ @@ -36,7 +35,6 @@ def setUp(self): self.loadUsdScene() cmds.refresh() - @unittest.skipUnless(mtohUtils.checkForMayaUsdPlugin(), "Requires Maya USD Plugin.") def test_NativeInstances(self): with PluginLoaded('mayaHydraCppTests'): instances = ["/cubes_1", "/cubes_2"] diff --git a/test/lib/mayaUsd/render/mayaToHydra/cpp/testUsdStageLayerMuting.py b/test/lib/mayaUsd/render/mayaToHydra/cpp/testUsdStageLayerMuting.py index 6b131b23d2..e2d92cca01 100644 --- a/test/lib/mayaUsd/render/mayaToHydra/cpp/testUsdStageLayerMuting.py +++ b/test/lib/mayaUsd/render/mayaToHydra/cpp/testUsdStageLayerMuting.py @@ -16,7 +16,6 @@ import fixturesUtils import mtohUtils -import unittest from testUtils import PluginLoaded diff --git a/test/lib/mayaUsd/render/mayaToHydra/cpp/testWireframeSelectionHighlightSceneIndex.py b/test/lib/mayaUsd/render/mayaToHydra/cpp/testWireframeSelectionHighlightSceneIndex.py index 6dabde2fbf..d92c1532d7 100644 --- a/test/lib/mayaUsd/render/mayaToHydra/cpp/testWireframeSelectionHighlightSceneIndex.py +++ b/test/lib/mayaUsd/render/mayaToHydra/cpp/testWireframeSelectionHighlightSceneIndex.py @@ -4,8 +4,6 @@ import mayaUtils from testUtils import PluginLoaded -import unittest - class TestWireframeSelectionHighlightSceneIndex(mtohUtils.MayaHydraBaseTestCase): # MayaHydraBaseTestCase.setUpClass requirement. _file = __file__ diff --git a/test/lib/mayaUsd/render/mayaToHydra/testArnoldLights.py b/test/lib/mayaUsd/render/mayaToHydra/testArnoldLights.py index c41841b57d..b13e984d7e 100644 --- a/test/lib/mayaUsd/render/mayaToHydra/testArnoldLights.py +++ b/test/lib/mayaUsd/render/mayaToHydra/testArnoldLights.py @@ -18,7 +18,6 @@ import fixturesUtils import mtohUtils import mayaUtils -import unittest import platform class TestArnoldLights(mtohUtils.MayaHydraBaseTestCase): #Subclassing mtohUtils.MayaHydraBaseTestCase to be able to call self.assertSnapshotClose diff --git a/test/lib/mayaUsd/render/mayaToHydra/testImageDiffing.py b/test/lib/mayaUsd/render/mayaToHydra/testImageDiffing.py index 6c0144cc5a..52f2a6fe74 100644 --- a/test/lib/mayaUsd/render/mayaToHydra/testImageDiffing.py +++ b/test/lib/mayaUsd/render/mayaToHydra/testImageDiffing.py @@ -12,13 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import os.path -import sys -import unittest - -import maya.cmds as cmds -import maya.mel - import fixturesUtils import mtohUtils diff --git a/test/lib/mayaUsd/render/mayaToHydra/testMaterialXOnNative.py b/test/lib/mayaUsd/render/mayaToHydra/testMaterialXOnNative.py index 6cf3cbc741..31605cf430 100644 --- a/test/lib/mayaUsd/render/mayaToHydra/testMaterialXOnNative.py +++ b/test/lib/mayaUsd/render/mayaToHydra/testMaterialXOnNative.py @@ -16,7 +16,6 @@ import mayaUtils import fixturesUtils import mtohUtils -import unittest class TestMaterialXOnNative(mtohUtils.MayaHydraBaseTestCase): _file = __file__ diff --git a/test/lib/mayaUsd/render/mayaToHydra/testMayaDisplayModes.py b/test/lib/mayaUsd/render/mayaToHydra/testMayaDisplayModes.py index a718e64f62..fea6b8f85a 100644 --- a/test/lib/mayaUsd/render/mayaToHydra/testMayaDisplayModes.py +++ b/test/lib/mayaUsd/render/mayaToHydra/testMayaDisplayModes.py @@ -18,7 +18,6 @@ import fixturesUtils import mtohUtils import mayaUtils -import unittest from testUtils import PluginLoaded import platform diff --git a/test/lib/mayaUsd/render/mayaToHydra/testMayaLights.py b/test/lib/mayaUsd/render/mayaToHydra/testMayaLights.py index 8ae3414488..b7954f0de3 100644 --- a/test/lib/mayaUsd/render/mayaToHydra/testMayaLights.py +++ b/test/lib/mayaUsd/render/mayaToHydra/testMayaLights.py @@ -18,7 +18,6 @@ import fixturesUtils import mtohUtils import mayaUtils -import unittest import platform diff --git a/test/lib/mayaUsd/render/mayaToHydra/testMayaUsdAPIUsage.py b/test/lib/mayaUsd/render/mayaToHydra/testMayaUsdAPIUsage.py index 5391ea36a7..23148e37f9 100644 --- a/test/lib/mayaUsd/render/mayaToHydra/testMayaUsdAPIUsage.py +++ b/test/lib/mayaUsd/render/mayaToHydra/testMayaUsdAPIUsage.py @@ -17,7 +17,6 @@ import maya.cmds as cmds import fixturesUtils import mtohUtils -import unittest import mayaUtils import platform diff --git a/test/lib/mayaUsd/render/mayaToHydra/testMtohBasicRender.py b/test/lib/mayaUsd/render/mayaToHydra/testMtohBasicRender.py index bc44c872a9..7b974d9d14 100644 --- a/test/lib/mayaUsd/render/mayaToHydra/testMtohBasicRender.py +++ b/test/lib/mayaUsd/render/mayaToHydra/testMtohBasicRender.py @@ -14,11 +14,6 @@ # limitations under the License. # # Test to make sure that our snapshot-comparison tools work - -import os.path -import sys -import unittest - import maya.cmds as cmds import maya.mel diff --git a/test/lib/mayaUsd/render/mayaToHydra/testMtohDagChanges.py b/test/lib/mayaUsd/render/mayaToHydra/testMtohDagChanges.py index 1eee9cac3d..838b807170 100644 --- a/test/lib/mayaUsd/render/mayaToHydra/testMtohDagChanges.py +++ b/test/lib/mayaUsd/render/mayaToHydra/testMtohDagChanges.py @@ -13,9 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import sys -import unittest - import maya.cmds as cmds import maya.mel diff --git a/test/lib/mayaUsd/render/mayaToHydra/testNewSceneWithStage.py b/test/lib/mayaUsd/render/mayaToHydra/testNewSceneWithStage.py index a5de691b79..7bb6d2d8ea 100644 --- a/test/lib/mayaUsd/render/mayaToHydra/testNewSceneWithStage.py +++ b/test/lib/mayaUsd/render/mayaToHydra/testNewSceneWithStage.py @@ -17,8 +17,6 @@ import fixturesUtils import mtohUtils -import unittest - class TestStage(mtohUtils.MayaHydraBaseTestCase): # MayaHydraBaseTestCase.setUpClass requirement. _file = __file__ diff --git a/test/lib/mayaUsd/render/mayaToHydra/testRefinement.py b/test/lib/mayaUsd/render/mayaToHydra/testRefinement.py index 6817cd65a2..61361436fa 100644 --- a/test/lib/mayaUsd/render/mayaToHydra/testRefinement.py +++ b/test/lib/mayaUsd/render/mayaToHydra/testRefinement.py @@ -16,10 +16,9 @@ import fixturesUtils import mtohUtils -import unittest import testUtils -class TestRefinement(mtohUtils.MtohTestCase): +class TestRefinement(mtohUtils.MayaHydraBaseTestCase): _file = __file__ IMAGEDIFF_FAIL_THRESHOLD = 0.01 @@ -31,7 +30,6 @@ def verifySnapshot(self, imageName): self.IMAGEDIFF_FAIL_THRESHOLD, self.IMAGEDIFF_FAIL_PERCENT) - @unittest.skipUnless(mtohUtils.checkForMayaUsdPlugin(), "Requires Maya USD Plugin.") def test_usdPrim(self): import usdUtils usdScenePath = testUtils.getTestScene('testStagePayloadsReferences', 'cube.usda') diff --git a/test/lib/mayaUsd/render/mayaToHydra/testSceneBrowser.py b/test/lib/mayaUsd/render/mayaToHydra/testSceneBrowser.py index f5d78a9841..bfcd1cba04 100644 --- a/test/lib/mayaUsd/render/mayaToHydra/testSceneBrowser.py +++ b/test/lib/mayaUsd/render/mayaToHydra/testSceneBrowser.py @@ -13,7 +13,6 @@ # limitations under the License. # import maya.cmds as cmds -import maya.mel as mel import fixturesUtils import mtohUtils diff --git a/test/lib/mayaUsd/render/mayaToHydra/testStageAddPrim.py b/test/lib/mayaUsd/render/mayaToHydra/testStageAddPrim.py index c13e226822..11eba7990a 100644 --- a/test/lib/mayaUsd/render/mayaToHydra/testStageAddPrim.py +++ b/test/lib/mayaUsd/render/mayaToHydra/testStageAddPrim.py @@ -16,11 +16,6 @@ import fixturesUtils import mtohUtils -import mayaUtils -from testUtils import PluginLoaded - -import unittest -import sys class TestStage(mtohUtils.MayaHydraBaseTestCase): # MayaHydraBaseTestCase.setUpClass requirement. diff --git a/test/lib/mayaUsd/render/mayaToHydra/testStagePayloadsReferences.py b/test/lib/mayaUsd/render/mayaToHydra/testStagePayloadsReferences.py index e0707b1d84..504ac064ea 100644 --- a/test/lib/mayaUsd/render/mayaToHydra/testStagePayloadsReferences.py +++ b/test/lib/mayaUsd/render/mayaToHydra/testStagePayloadsReferences.py @@ -17,7 +17,6 @@ import maya.cmds as cmds import fixturesUtils import mtohUtils -import unittest import testUtils import mayaUtils import ufe diff --git a/test/lib/mayaUsd/render/mayaToHydra/testStageVariants.py b/test/lib/mayaUsd/render/mayaToHydra/testStageVariants.py index 0578431c25..1b97fcd4ea 100644 --- a/test/lib/mayaUsd/render/mayaToHydra/testStageVariants.py +++ b/test/lib/mayaUsd/render/mayaToHydra/testStageVariants.py @@ -17,8 +17,6 @@ import maya.cmds as cmds import fixturesUtils import mtohUtils -import unittest -import testUtils import mayaUtils import ufe diff --git a/test/lib/mayaUsd/render/mayaToHydra/testTransforms.py b/test/lib/mayaUsd/render/mayaToHydra/testTransforms.py index 15a7ad6e53..70f27b2d6a 100644 --- a/test/lib/mayaUsd/render/mayaToHydra/testTransforms.py +++ b/test/lib/mayaUsd/render/mayaToHydra/testTransforms.py @@ -13,11 +13,9 @@ # limitations under the License. # import maya.cmds as cmds -import maya.mel import fixturesUtils import mtohUtils -import unittest class TestTransforms(mtohUtils.MayaHydraBaseTestCase): _file = __file__ diff --git a/test/lib/mayaUsd/render/mayaToHydra/testUSDLights.py b/test/lib/mayaUsd/render/mayaToHydra/testUSDLights.py index 4ef9408897..fc78af534c 100644 --- a/test/lib/mayaUsd/render/mayaToHydra/testUSDLights.py +++ b/test/lib/mayaUsd/render/mayaToHydra/testUSDLights.py @@ -18,7 +18,6 @@ import fixturesUtils import mtohUtils import mayaUtils -import unittest import platform class TestUSDLights(mtohUtils.MayaHydraBaseTestCase): #Subclassing mtohUtils.MayaHydraBaseTestCase to be able to call self.assertSnapshotClose