-
Notifications
You must be signed in to change notification settings - Fork 4
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
Refactored test case plugin loading and unloading. #204
Refactored test case plugin loading and unloading. #204
Conversation
|
||
def createScene(self): | ||
self._locator = cmds.createNode('MhFlowViewportAPILocator') | ||
cmds.setAttr(self._locator + '.numCubesX', 3) | ||
cmds.setAttr(self._locator + '.numCubesY', 3) | ||
cmds.setAttr(self._locator + '.numCubesZ', 3) | ||
|
||
@classmethod |
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.
This is the duplication, brought back to the base class.
@@ -94,6 +97,12 @@ def setUp(self): | |||
|
|||
@classmethod | |||
def tearDownClass(cls): |
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.
Base class now unloads plugins that were loaded specifically for the test.
test/testUtils/mtohUtils.py
Outdated
# Clean out the scene to allow all plugins to unload cleanly. | ||
cmds.file(new=True, force=True) | ||
for p in reversed(cls._pluginsToUnload): | ||
if p != 'mayaHydraFlowViewportAPILocator': |
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.
Unloading this plugin crashes, entered as HYDRA-1304.
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.
Nice cleanup!
There was duplication of infrastructure for loading plugins needed for a test, and unloading them afterwards. This has been removed, and the union of the support was kept, including the
_requiredPlugins
Python class variable that is presented in the Markdown documentation.