Skip to content

Commit a5aad37

Browse files
stonebigclaude
andcommitted
Tests: skip widget-driving tests when App() fell back to no-GUI mode
Without a display, App() silently degrades to use_gui=False, so the headless CI pytest step ran test_general.py GUI-less. The two v1.1.0 tests that drive real widgets and the clipboard then fail; skip them there — they still run in the Xvfb step. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent c113c1f commit a5aad37

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

sqlite_bro/tests/test_general.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
import io
77
from sqlite_bro import sqlite_bro
88
app = sqlite_bro.App()
9+
# without a display (headless CI), App() falls back to use_gui=False :
10+
# tests that drive real widgets must then be skipped (they run under Xvfb)
11+
needs_gui = pytest.mark.skipif(not app.use_gui, reason="no display")
912
def test_DeBase():
1013
"learning the ropes"
1114
assert 1 == 1
@@ -68,6 +71,7 @@ def test_Outputs():
6871
assert result[3] == "DS!Citroën\n"
6972

7073

74+
@needs_gui
7175
def test_TabClickOutsideLabels():
7276
"clicking a notebook outside any tab label must not raise TclError"
7377
from types import SimpleNamespace
@@ -82,6 +86,7 @@ def test_TabClickOutsideLabels():
8286
app.close_db
8387

8488

89+
@needs_gui
8590
def test_GridCopyFilter(monkeypatch):
8691
"Ctrl+c copy and Ctrl+f regex filter on a results treeview"
8792
from tkinter import ttk

0 commit comments

Comments
 (0)