Get parameter's item in a nicer way

This commit is contained in:
Daniel Lidstrom 2020-12-21 20:48:15 -08:00
parent 4618c705e2
commit b164e54e15

View File

@ -157,7 +157,7 @@ def test_data_race():
p.sigValueChanged.connect(override)
t.setParameters(p)
pi, = t.listAllItems()
pi = next(iter(p.items))
assert pi.param is p
pi.widget.setValue(2)
assert p.value() == pi.widget.value() == 1