Skip to content

Commit

Permalink
Add tests for checking the theme.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexhuszagh committed Sep 7, 2024
1 parent 639c2a0 commit 9a62769
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ci/configure_all.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
#!/usr/bin/env bash
#
# Run each configure for all supported frameworks, and store them in `dist/ci`.
#
# This requires the correct frameworks to be installed:
# - PyQt5
# - PyQt6
# - PySide6
# And if using Python 3.10 or earlier:
# - PySide2

set -eux pipefail

Expand Down
20 changes: 20 additions & 0 deletions ci/theme.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env bash
#
# Use scripts to check if the theme determination works.

set -eux pipefail

ci_home="$(dirname "$(realpath "${BASH_SOURCE[0]}")")"
project_home="$(dirname "${ci_home}")"
cd "${project_home}/example"

if [[ ! -v PYTHON ]]; then
PYTHON=python
fi
theme=$("${PYTHON}" -c "import breeze_theme; print(breeze_theme.get_theme())")
if [[ "${theme}" != Theme.* ]]; then
>&2 echo "Unable to get the correct theme."
exit 1
fi
"${PYTHON}" -c "import breeze_theme; print(breeze_theme.is_light())"
"${PYTHON}" -c "import breeze_theme; print(breeze_theme.is_dark())"

0 comments on commit 9a62769

Please sign in to comment.