Tabs: add test for slice support

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2018-09-10 22:45:23 +01:00
parent bb9bc80d9b
commit 65649e91c4
Signed by: pep
GPG key ID: DEDA74AEECA9D0F2

View file

@ -172,3 +172,14 @@ def test_set_current():
tabs.set_current_tab(dummy2) tabs.set_current_tab(dummy2)
assert tabs.current_tab is dummy2 assert tabs.current_tab is dummy2
def test_slice():
DummyTab.reset()
tabs = Tabs(h)
dummy = DummyTab()
dummy2 = DummyTab()
dummy3 = DummyTab()
tabs.append(dummy)
tabs.append(dummy2)
tabs.append(dummy3)
assert tabs[1:2][0] is dummy2