Skip to content

Commit ab60f53

Browse files
committed
Skip Textual app tests on wasm
Importing textual works on Pyodide, but instantiating an App selects a terminal driver and the Linux driver needs termios, which Emscripten does not provide. Guard with blosc2.IS_WASM, like the other wasm exclusions in the test suite.
1 parent 6779b7b commit ab60f53

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

tests/b2view/test_basics.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@
3636
pytest.importorskip("textual")
3737
pytest.importorskip("pytest_asyncio")
3838

39+
import blosc2
40+
41+
if blosc2.IS_WASM:
42+
# Instantiating a Textual app selects a terminal driver, and the Linux
43+
# driver needs termios, which Emscripten does not provide.
44+
pytest.skip("Textual apps need a terminal driver (termios)", allow_module_level=True)
45+
3946
import tree_store_gen as gen
4047
from textual.widgets import DataTable, Input, Tree
4148

tests/test_b2view_model.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,8 @@ def test_store_browser_uses_grid_preview_for_2d_ndarray(tmp_path):
128128

129129
def test_ctable_preview_buffer_reuses_loaded_rows(tmp_path):
130130
pytest.importorskip("textual", reason="b2view TUI requires textual")
131+
if blosc2.IS_WASM:
132+
pytest.skip("instantiating a Textual app needs a terminal driver (termios)")
131133
path = tmp_path / "table.b2z"
132134
persistent = blosc2.CTable(Row, urlpath=str(path), mode="w")
133135
for i in range(100):

0 commit comments

Comments
 (0)