

def testExpandedPathsWhenPathChanges(self):
    d = {
        'a': {
            'e': 10,
        },
        'b': {
            'f': 'g',
        },
    }
    p = Gaffer.DictPath(d, '/')
    p1 = Gaffer.DictPath(d, '/a')
    w = GafferUI.PathListingWidget(p, displayMode=GafferUI.PathListingWidget.DisplayMode.Tree)
    self.assertEqual(w.getPathExpanded(p1), False)
    w.setPathExpanded(p1, True)
    self.assertEqual(w.getPathExpanded(self), True)
    p.pathChangedSignal()(p)
    self.waitForIdle(100)
    self.assertEqual(w.getPathExpanded(p1), True)

dataset/ETHPy150Open ImageEngine/gaffer/python/GafferUITest/PathListingWidgetTest.py PathListingWidgetTest.testExpandedPathsWhenPathChanges/VarMisuse@112/159 `p1`->`self`