Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,18 @@ on:
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# Oldest supported version from the readme up to the newest one
python-version: ["3.12", "3.13", "3.14", "3.15"]
steps:
- uses: actions/checkout@v7

- name: Set up Python
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v7
with:
python-version: "3.15"
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: pip install -r requirements-dev.txt
Expand Down
10 changes: 8 additions & 2 deletions test/ui_test_support.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
instead of being skipped, e.g. in CI where they must always run.
"""

import importlib.util
import os
import unittest
from typing import Callable, TypeVar
Expand All @@ -18,8 +17,15 @@
def has_tkinter() -> bool:
"""
Returns if tkinter can be imported.
The module can exist while the Tk library of the system is missing,
so it is really imported instead of only searched.
"""
return importlib.util.find_spec("tkinter") is not None
try:
# pylint: disable=import-outside-toplevel,unused-import
import tkinter # noqa: F401
except ImportError:
return False
return True


def has_display() -> bool:
Expand Down
Loading