Tabs: add test for slice support
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
parent
bb9bc80d9b
commit
65649e91c4
1 changed files with 11 additions and 0 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue