Skip to content

Commit

Permalink
MAYA-129071 make new test compatible with Python 2
Browse files Browse the repository at this point in the history
  • Loading branch information
pierrebai-adsk committed Jun 1, 2023
1 parent 65d202e commit d32a9a6
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions test/lib/ufe/testSelectionNotification.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,10 @@ def setUp(self):
cmds.select(clear=True)

def runSelectionNotificationTest(self, selectCmd, getSelection, notificationName):
selected = []
self.selected = []

def selectionCallback(params):
nonlocal selected
selected = getSelection()
self.selected = getSelection()

def clearSelection():
globalSn = ufe.GlobalSelection.get()
Expand All @@ -106,7 +105,7 @@ def clearSelection():
clearSelection()
selectCmd(item)
expected = ufe.PathString.string(item.path())
self.assertListEqual(selected, [expected])
self.assertListEqual(self.selected, [expected])
finally:
om.MEventMessage.removeCallback(ufeSelectionCallbackID)

Expand Down

0 comments on commit d32a9a6

Please sign in to comment.