pyproject.toml: transfer more metadata from setup.cfg
[git-cola.git] / test / switcher_test.py
blob4aeee9a14573b8b5f842ca6e7bed35f0af75a660
1 """Test Quick Switcher"""
2 # pylint: disable=redefined-outer-name
3 from __future__ import absolute_import, division, print_function, unicode_literals
5 from cola import icons
6 from cola.widgets import switcher
9 def test_switcher_item_with_only_key():
10 """item text would be key by building item without name"""
11 key = 'item-key'
12 actual = switcher.switcher_item(key)
14 assert actual.key == key
15 assert actual.text() == key
18 def test_switcher_item_with_key_name_icon():
19 """item text would be name by building item with key and name"""
20 key = 'item-key'
21 name = 'item-name'
22 icon = icons.folder()
24 actual = switcher.switcher_item(key, icon, name)
26 assert actual.key == key
27 assert actual.text() == name