Skip to content
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

GafferUITest : Fix assertNodeUIsHaveExpectedLifetime() test #6127

Merged
merged 1 commit into from
Nov 1, 2024

Conversation

ivanimanishi
Copy link
Member

This test was raising an exception for nodes that are supposed to be "invisible", and therefore had no NodeGadget.

Related issues

  • Allows the use of assertNodeUIsHaveExpectedLifetime() test on modules that include invisible nodes.

Dependencies

None

Breaking changes

None

Checklist

  • I have read the contribution guidelines.
  • I have updated the documentation, if applicable.
  • I have tested my change(s) in the test suite, and added new test cases where necessary.
  • My code follows the Gaffer project's prevailing coding style and conventions.

@@ -169,6 +169,9 @@ def assertNodeUIsHaveExpectedLifetime( self, module ) :
weakScript = weakref.ref( script )

nodeGadget = GafferUI.NodeGadget.create( script["node"] )
if not nodeGadget :
continue
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This means we're skipping the tests for weakNodeUI just because a NodeGadget isn't registered. Could you move the assertIsNone for that above here so it still runs?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated it in place so that only the nodeGadget related tests are skipped if it's None.
Hopefully that's what you meant?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, that's great - thanks Ivan!

This test was raising an exception for nodes that are supposed to be
"invisible", and therefore had no `NodeGadget`.
@johnhaddon johnhaddon merged commit ded94f1 into GafferHQ:1.5_maintenance Nov 1, 2024
5 checks passed
@ivanimanishi ivanimanishi deleted the gafferTestFix branch November 1, 2024 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants