Skip to content

Commit

Permalink
GafferUITest : Fix assertNodeUIsHaveExpectedLifetime() test
Browse files Browse the repository at this point in the history
This test was raising an exception for nodes that are supposed to be
"invisible", and therefore had no `NodeGadget`.
  • Loading branch information
ivanimanishi authored and johnhaddon committed Nov 1, 2024
1 parent 9f7f4f7 commit 5843546
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions Changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Fixes
-----

- Render, InteractiveRender : Added default node name arguments to the compatibility shims for removed subclasses such as ArnoldRender.
- GafferUITest : Fixed `assertNodeUIsHaveExpectedLifetime()` test for invisible nodes.

1.5.0.1 (relative to 1.5.0.0)
=======
Expand Down
8 changes: 5 additions & 3 deletions python/GafferUITest/TestCase.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,13 @@ def assertNodeUIsHaveExpectedLifetime( self, module ) :
weakScript = weakref.ref( script )

nodeGadget = GafferUI.NodeGadget.create( script["node"] )
weakNodeGadget = weakref.ref( nodeGadget )
if nodeGadget :
weakNodeGadget = weakref.ref( nodeGadget )
del nodeGadget
self.assertIsNone( weakNodeGadget() )

del window, nodeUI, nodeGadget
del window, nodeUI
self.assertIsNone( weakNodeUI() )
self.assertIsNone( weakNodeGadget() )

del script
self.assertIsNone( weakScript() )
Expand Down

0 comments on commit 5843546

Please sign in to comment.