コード例 #1
0
def test_constructor_options(qtbot):
    widget = EntryWidget(options=test_options_good)
    show(locals())
    assert widget.getOptions() == {k: k for k in test_options_good}
    assert widget.getSelected() == test_options_good[0]
コード例 #2
0
def test_setOptions(qtbot):
    widget = EntryWidget()
    show(locals())
    widget.setOptions(test_options_good)
    assert widget.getOptions() == {k: k for k in test_options_good}
    assert widget.getSelected() == test_options_good[0]