From 65649e91c4f2130143645a6901bfb029e44e2993 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Mon, 10 Sep 2018 22:45:23 +0100 Subject: [PATCH] Tabs: add test for slice support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maxime “pep” Buquet --- test/test_tabs.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/test_tabs.py b/test/test_tabs.py index aab4f0d0..0a6930d4 100644 --- a/test/test_tabs.py +++ b/test/test_tabs.py @@ -172,3 +172,14 @@ def test_set_current(): tabs.set_current_tab(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