Skip to content

Commit

Permalink
chore: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
phil65 committed Jul 30, 2023
1 parent 561e4bd commit 247d681
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions tests/test_widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import pytest

# import prettyqt
from prettyqt import constants, core, gui, iconprovider, qt, widgets
from prettyqt import constants, core, gui, iconprovider, widgets
from prettyqt.utils import InvalidParamError


Expand Down Expand Up @@ -170,7 +170,6 @@ def test_datetimeedit(qtbot):
widget.get_displayed_sections()


# @pytest.mark.skipif(sys.platform == "linux", reason="X11 connection break")
def test_dialog(qtbot, qttester):
dlg = widgets.Dialog()
dlg.set_layout("horizontal")
Expand Down Expand Up @@ -213,7 +212,6 @@ def test_dialogbuttonbox(qtbot):
btn = box.add_default_buttons(["ok"])


# @pytest.mark.skipif(sys.platform == "linux", reason="X11 connection break")
def test_dockwidget(qtbot):
widget = widgets.DockWidget()
qtbot.addWidget(widget)
Expand Down Expand Up @@ -369,7 +367,6 @@ def test_graphicsitem(qtbot):
# item.get_shape()


# @pytest.mark.skipif(sys.platform == "linux", reason="X11 connection break")
def test_graphicsgridlayout(qtbot):
layout = widgets.GraphicsGridLayout()
item = widgets.GraphicsProxyWidget()
Expand Down Expand Up @@ -405,7 +402,6 @@ def test_graphicspixmapitem(qtbot):
assert item.get_pixmap() is None


@pytest.mark.skipif(qt.API == "pyside6", reason="Segfault")
def test_graphicsscene(qtbot):
scene = widgets.GraphicsScene()
icon = iconprovider.get_icon("mdi.help-circle-outline")
Expand Down Expand Up @@ -639,7 +635,6 @@ def test_lineedit(qtbot):
widget += "append"


@pytest.mark.skipif(qt.API == "pyside6", reason="Segfault")
def test_listview(qtbot):
widget = widgets.ListView()
qtbot.addWidget(widget)
Expand Down Expand Up @@ -707,7 +702,6 @@ def test_listwidgetitem(qtbot):
bytes(item)


# @pytest.mark.skipif(sys.platform == "linux", reason="X11 connection break")
def test_mainwindow(qtbot):
window = widgets.MainWindow()
qtbot.addWidget(window)
Expand Down Expand Up @@ -815,7 +809,6 @@ def test_menubar(qtbot):
menu.add_menu("test_menubar")


# @pytest.mark.skipif(sys.platform == "linux", reason="X11 connection break")
def test_messagebox(qtbot):
widget = widgets.MessageBox(buttons=["reset"])
widget.set_icon("warning")
Expand Down Expand Up @@ -1022,7 +1015,6 @@ def test_statusbar(qtbot):
status_bar.add_widget(widgets.Widget(), permanent=True)


# @pytest.mark.skipif(sys.platform == "linux", reason="X11 connection break")
def test_stackedlayout(qtbot):
layout = widgets.StackedLayout()
widget = widgets.RadioButton("test_stackedlayout")
Expand Down Expand Up @@ -1071,7 +1063,6 @@ def test_spinbox(qtbot):
assert widget.get_value() == 10


# @pytest.mark.skipif(sys.platform == "linux", reason="X11 connection break")
def test_splashscreen(qtbot):
pixmap = gui.Pixmap.create_dot()
scr = widgets.SplashScreen(pixmap)
Expand Down Expand Up @@ -1267,7 +1258,6 @@ def test_toolbutton(qtbot):
assert widget["test"] == act


# @pytest.mark.skipif(sys.platform == "linux", reason="X11 connection break")
def test_tooltip(qtbot):
widgets.ToolTip.show_text(text="test")

Expand Down Expand Up @@ -1336,7 +1326,6 @@ def test_tableview(qtbot):
assert widget.v_header is not None


@pytest.mark.skipif(sys.platform == "linux", reason="Only supported on windows")
def test_tablewidget(qtbot, tablewidget):
# qtbot.addWidget(tablewidget)
tablewidget.sort()
Expand Down Expand Up @@ -1495,13 +1484,11 @@ def test_undoview(qtbot):
assert view[0] == cmd


# @pytest.mark.skipif(sys.platform == "linux", reason="X11 connection break")
def test_whatsthis(qtbot):
with widgets.WhatsThis.enter_mode():
pass


# @pytest.mark.skipif(sys.platform == "linux", reason="X11 connection break")
def test_widget(qtbot):
widget = widgets.Widget()
qtbot.addWidget(widget)
Expand Down

0 comments on commit 247d681

Please sign in to comment.