Skip to content

Commit

Permalink
TestCase : Complain about zombie catalogues
Browse files Browse the repository at this point in the history
  • Loading branch information
johnhaddon committed Dec 6, 2023
1 parent f8afff2 commit 705688a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions python/GafferTest/TestCase.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,13 @@ def tearDown( self ) :
if message not in self.__messagesToIgnore :
self.fail( f"Unexpected message : {message}" )

import gc
import GafferImage
self.assertEqual(
[ o for o in gc.get_objects() if isinstance( o, GafferImage.Catalogue ) ],
[]
)

## Registers a message that will be ignored if it is emitted during the
# test run, instead of triggering a failure.
def ignoreMessage( self, level, context, message ) :
Expand Down

0 comments on commit 705688a

Please sign in to comment.