diff --git a/scripts/dev/check_coverage.py b/scripts/dev/check_coverage.py index e9bb675b0..698e04b79 100644 --- a/scripts/dev/check_coverage.py +++ b/scripts/dev/check_coverage.py @@ -115,8 +115,6 @@ PERFECT_FILES = [ 'qutebrowser/mainwindow/statusbar/tabindex.py'), ('tests/unit/mainwindow/statusbar/test_textbase.py', 'qutebrowser/mainwindow/statusbar/textbase.py'), - ('tests/unit/mainwindow/statusbar/test_prompt.py', - 'qutebrowser/mainwindow/statusbar/prompt.py'), ('tests/unit/mainwindow/statusbar/test_url.py', 'qutebrowser/mainwindow/statusbar/url.py'), ('tests/unit/mainwindow/test_messageview.py', diff --git a/tests/unit/mainwindow/statusbar/test_prompt.py b/tests/unit/mainwindow/statusbar/test_prompt.py deleted file mode 100644 index 86c6122b1..000000000 --- a/tests/unit/mainwindow/statusbar/test_prompt.py +++ /dev/null @@ -1,57 +0,0 @@ -# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: - -# Copyright 2016 Florian Bruhin (The Compiler) -# -# This file is part of qutebrowser. -# -# qutebrowser is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# qutebrowser is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with qutebrowser. If not, see . - -"""Test Prompt widget.""" - -import sip - -import pytest - -from qutebrowser.mainwindow.statusbar.prompt import Prompt -from qutebrowser.utils import objreg - - -@pytest.fixture -def prompt(qtbot, win_registry): - prompt = Prompt(0) - qtbot.addWidget(prompt) - - yield prompt - - # If we don't clean up here, this test will remove 'prompter' from the - # objreg at some point in the future, which will cause some other test to - # fail. - sip.delete(prompt) - - -def test_prompt(prompt): - prompt.show() - objreg.get('prompt', scope='window', window=0) - objreg.get('prompter', scope='window', window=0) - - -@pytest.mark.xfail(reason="This test is broken and I don't get why") -def test_resizing(fake_statusbar, prompt): - fake_statusbar.hbox.addWidget(prompt) - - prompt.txt.setText("Blah?") - old_width = prompt.lineedit.width() - - prompt.lineedit.setText("Hello World" * 100) - assert prompt.lineedit.width() > old_width