-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MAYA-107463 Make sure we leave default material mode when the test ends. Check fo… #1552
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,6 +55,11 @@ def setUpClass(cls): | |
|
||
cls._testDir = os.path.abspath('.') | ||
|
||
@classmethod | ||
def tearDownClass(cls): | ||
panel = mayaUtils.activeModelPanel() | ||
cmds.modelEditor(panel, edit=True, useDefaultMaterial=False) | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If testInstanceDefaultMaterial fails the image test while useDefaultMaterial is enabled the rest of the script doesn't run to turn it off. I have to set useDefaultMaterial false in the tearDownClass so other scripts will not have it on, and also at the start of the other test runs within this script to ensure they don't have it on. |
||
def assertSnapshotClose(self, imageName): | ||
baselineImage = os.path.join(self._baselineDir, imageName) | ||
snapshotImage = os.path.join(self._testDir, imageName) | ||
|
@@ -64,6 +69,8 @@ def assertSnapshotClose(self, imageName): | |
def _StartTest(self, testName): | ||
cmds.file(force=True, new=True) | ||
mayaUtils.loadPlugin("mayaUsdPlugin") | ||
panel = mayaUtils.activeModelPanel() | ||
cmds.modelEditor(panel, edit=True, useDefaultMaterial=False) | ||
self._testName = testName | ||
testFile = testUtils.getTestScene("instances", self._testName + ".usda") | ||
mayaUtils.createProxyFromFile(testFile) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Building with master I discovered this expression was wrong.