Skip to content

Commit

Permalink
chore(linux): rename test files
Browse files Browse the repository at this point in the history
This change rename the test files for Linux according to the discussion
at the Keyman conference in November 2024.

Python is pretty opinionated about the naming of files, so we have to
use `*_tests.py` as test filename instead of the usual `*.tests.py`.
  • Loading branch information
ermshiperete committed Nov 26, 2024
1 parent 9a2e48b commit 4a852c9
Show file tree
Hide file tree
Showing 19 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion linux/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ debianpackage/
*.tar.xz
*.tar.gz
*.dsc
help/reference/
docs/help/reference/

# Cached/auto-compiled Python bytecode
*.pyc
Expand Down
4 changes: 2 additions & 2 deletions linux/ibus-keyman/src/test/meson.build
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
keymanutil_sources = [
'keymanutil_tests.c',
'keymanutil.tests.c',
util_files,
]

Expand Down Expand Up @@ -55,7 +55,7 @@ print_kmp_test = executable(
bcp47_util_tests = executable(
'bcp47-util-tests',
sources: [
'bcp47util_tests.c',
'bcp47util.tests.c',
'../bcp47util.c'
],
dependencies: [ gtk, icu ],
Expand Down
12 changes: 6 additions & 6 deletions linux/keyman-config/run-tests.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
#!/bin/bash
PYTHONPATH=.:$PYTHONPATH
PYTHONPATH=.:${PYTHONPATH}

XDG_CONFIG_HOME=$(mktemp --directory)
export XDG_CONFIG_HOME

if [ -f /usr/libexec/ibus-memconf ]; then
if [[ -f /usr/libexec/ibus-memconf ]]; then
export GSETTINGS_BACKEND=keyfile
fi

if [ "$1" == "--coverage" ]; then
if [[ "$1" == "--coverage" ]]; then
coverage="-m coverage run --source=. --data-file=build/.coverage"
fi

if [ -n "$TEAMCITY_VERSION" ]; then
if [[ -n "${TEAMCITY_VERSION}" ]]; then
if ! pip3 list --format=columns | grep -q teamcity-messages; then
pip3 install teamcity-messages
fi
Expand All @@ -23,6 +23,6 @@ else
fi

# shellcheck disable=SC2086
python3 ${coverage:-} -m ${test_module:-} discover ${extra_opts:-} -s tests -p test_*.py
python3 ${coverage:-} -m "${test_module:-}" discover ${extra_opts:-} -s tests/ -p "*_tests.py"

rm -rf "$XDG_CONFIG_HOME"
rm -rf "${XDG_CONFIG_HOME}"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 4a852c9

Please sign in to comment.