Skip to content

Commit 5c9905a

Browse files
committed
Test: skip the tk display backend when tkinter is missing
The tk backend was always considered available, its tests failed on the Python builds without tkinter (the Windows NuGet package).
1 parent 655125a commit 5c9905a

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎test/test_display_sideeffects.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ def backend(request):
2323
try:
2424
if backend_str != "tk":
2525
assert load_backend(backend_str) == backend_str
26+
else:
27+
# some Python builds have no tkinter (the Windows NuGet package)
28+
pytest.importorskip("tkinter")
2629
return backend_str
2730
except (AssertionError, ValueError) as e:
2831
pytest.skip(str(e))

0 commit comments

Comments
 (0)