TST: python 3 generator compat

.keys() in python2 returns a list, .keys() in python3 returns a
generator. Wrap .keys() in a list so that you can index on it in python3
This commit is contained in:
Eric Dill 2015-07-11 11:20:29 -05:00
parent 934c2e437f
commit 5bfb903dac
2 changed files with 4 additions and 4 deletions

View File

@ -12,7 +12,7 @@ def test_opts():
tree = pt.ParameterTree() tree = pt.ParameterTree()
tree.setParameters(param) tree.setParameters(param)
assert param.param('bool').items.keys()[0].widget.isEnabled() is False assert list(param.param('bool').items.keys())[0].widget.isEnabled() is False
assert param.param('color').items.keys()[0].widget.isEnabled() is False assert list(param.param('color').items.keys())[0].widget.isEnabled() is False