blob: fb9116bd80eb8bcf3ba6f5bc6d164b26400b6883 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# Copyright 2014-2021 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Test TabIndex widget."""
import pytest
from qutebrowser.mainwindow.statusbar.tabindex import TabIndex
@pytest.fixture
def tabindex(qtbot):
widget = TabIndex()
qtbot.add_widget(widget)
return widget
def test_tab_change(tabindex):
"""Make sure the tab index gets set correctly when switching tabs."""
tabindex.on_tab_index_changed(0, 2)
assert tabindex.text() == '[1/2]'
|