-
Notifications
You must be signed in to change notification settings - Fork 203
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
Migrate more tests from plugin/pxr to core mayaUsd #1042
Migrate more tests from plugin/pxr to core mayaUsd #1042
Conversation
|
||
@classmethod | ||
def tearDownClass(cls): | ||
standalone.uninitialize() | ||
|
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.
You may want to exclude commit 8e39493fd99d192f130e9d360f30c4b29255c548 or otherwise ignore whitespace when looking through this PR, since it causes GitHub to identify testXformStack.py
as a "large diff".
8e39493
to
88ed166
Compare
Rebased to resolve conflicts from the merge of #1039. |
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.
Thank you for continuing this migration, Matt. Not many comments from my side but I stopped for a second on testProxyShape
. We want this test to only validate features of the base proxy shape class and studio-specific features should be tested in separate test files. To communicate this intent, how about we rename this test to testProxyShapeBase
and operate on proxyShapeBase node (i.e. mayaUsdProxyShapeBase
instead of mayaUsdProxyShape
)
…as testBlockSceneModificationContext The UsdMayaBlockSceneModificationContext class that this test exercises is provided by mayaUsd itself and is not specific to the pxr plugin.
…nosticDelegate The UsdMayaDiagnosticDelegate class that this test exercises is provided by mayaUsd itself and is not specific to the pxr plugin.
This test is applicable to all flavors of mayaUsdProxyShapeBase. Though it is by no means an exhaustive test in its current form, it provides a base that can be extended with additional tests for the base proxy shape that is common to all derived proxy shapes. Tests for functionality specific to derived proxy shapes should go in separate tests.
88ed166
to
c00ce41
Compare
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.
LGTM, thank you!
…nto testHdImagingShape The pxrHdImagingShape is only used when using the legacy Pixar batch renderer and the Viewport 2.0 render delegate is disabled. It is also only created by default when using mayaUsdProxyShape nodes, not mayaUsdProxyShapeBase. This separates out pxrHdImagingShape-related testing into its own dedicated test script.
…eUtils This test exercises utilities in UsdMayaReadUtil and UsdMayaWriteUtil which are provided by mayaUsd itself and are not specific to the pxr plugin.
…s as testUsdExportUserTaggedAttributes Though the simple UI for tagging attributes for export still currently lives in the pxr plugin, the support for interpreting that tagging and exporting the tagged attributes is part of the mayaUsd core.
This test exercises UsdMayaXformStack and its related classes which are provided by mayaUsd itself and are not specific to the pxr plugin.
c00ce41
to
8b77381
Compare
Hopefully one last amendment to this: I separated out all of the |
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.
LGTM!
…ng the test This is a follow-up fix to a change I made in Autodesk#1042 that replaced the "__main__" module name included as part of a coding error message with "testDiagnosticDelegate" instead. While this is correct for the way the test is run using the mayaUsd CMake testing infrastructure, it is not correct in all cases. When the test is executed as a result of the unittest.main() call at the bottom of the file (e.g. when the script is executed directly via its shebang, when the script file is passed to a Python interpreter on the command-line, or when the script file's contents is read and executed through compile() and exec(), the module will be reported as "__main__". Otherwise, when the file is imported as a module and then executed using unittest.main(module=<module name>), the module name will match the file name and be reported as "testDiagnosticDelegate". To preserve the extra detail in the test, the regex used to match against the exception message was updated to recognize both cases.
All of these tests exercise functionality that is in mayaUsd itself and not specific to the
pxrUsd
plugin or other code inplugin/pxr
.This is in the continuing effort to thin out the
plugin/pxr
code leaving behind only the assembly-related stuff that we intend to ultimately get rid of.