-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TEMP: comment out test code, to research crash
- Loading branch information
Tomer Shalev
committed
May 4, 2024
1 parent
5948cc0
commit 6648470
Showing
1 changed file
with
22 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,26 @@ | ||
from labelle.gui.gui import LabelleWindow | ||
from labelle.gui.q_label_widgets import ( | ||
TextDymoLabelWidget, | ||
) | ||
# from labelle.gui.gui import LabelleWindow | ||
# from labelle.gui.q_label_widgets import ( | ||
# TextDymoLabelWidget, | ||
# ) | ||
|
||
|
||
def test_main_window(qtbot): | ||
widget = LabelleWindow() | ||
qtbot.addWidget(widget) | ||
print(qtbot) | ||
# widget = LabelleWindow() | ||
# qtbot.addWidget(widget) | ||
|
||
assert not widget._actions.isEnabled() | ||
assert widget._device_selector.isEnabled() | ||
assert not widget._label_list.isEnabled() | ||
assert not widget._render_widget.isEnabled() | ||
assert not widget._render.isEnabled() | ||
assert not widget._settings_toolbar.isEnabled() | ||
assert ( | ||
widget._device_selector._error_label.text() | ||
== "Failed scanning devices: No backend available" | ||
) | ||
assert not widget._actions._print_button.isEnabled() | ||
assert widget._label_list.count() == 1 | ||
item = widget._label_list.itemWidget(widget._label_list.item(0)) | ||
assert isinstance(item, TextDymoLabelWidget) | ||
assert item.label.toPlainText() == "text" | ||
# assert not widget._actions.isEnabled() | ||
# assert widget._device_selector.isEnabled() | ||
# assert not widget._label_list.isEnabled() | ||
# assert not widget._render_widget.isEnabled() | ||
# assert not widget._render.isEnabled() | ||
# assert not widget._settings_toolbar.isEnabled() | ||
# assert ( | ||
# widget._device_selector._error_label.text() | ||
# == "Failed scanning devices: No backend available" | ||
# ) | ||
# assert not widget._actions._print_button.isEnabled() | ||
# assert widget._label_list.count() == 1 | ||
# item = widget._label_list.itemWidget(widget._label_list.item(0)) | ||
# assert isinstance(item, TextDymoLabelWidget) | ||
# assert item.label.toPlainText() == "text" |