

def testSelectionSignalFrequency(self):
    d = {
        'a': {
            'e': 10,
        },
        'b': {
            'f': 'g',
        },
    }
    p = Gaffer.DictPath(d, '/')
    w = GafferUI.PathListingWidget(p, allowMultipleSelection=True)
    c = GafferTest.CapturingSlot(w.selectionChangedSignal())
    self.assertEqual(len(c), 0)
    w.setSelectedPaths([Gaffer.DictPath(d, '/a'), Gaffer.DictPath(d, '/b')])
    self.assertEqual(set([str(p) for p in self.getSelectedPaths()]), set(['/a', '/b']))
    self.assertEqual(len(c), 1)

dataset/ETHPy150Open ImageEngine/gaffer/python/GafferUITest/PathListingWidgetTest.py PathListingWidgetTest.testSelectionSignalFrequency/VarMisuse@128/174 `w`->`self`