From 7edda3becaa1153c60ee8a93870a3711322d40fa Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Wed, 27 Nov 2024 10:16:58 +0100 Subject: [PATCH] chore(linux): address code review comments --- docs/linux/README.md | 4 ++++ docs/linux/keyman-config.md | 2 +- docs/settings/linux/launch.json | 2 +- docs/settings/linux/settings.json | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/linux/README.md b/docs/linux/README.md index fe29b0d623a..80c1a78434c 100644 --- a/docs/linux/README.md +++ b/docs/linux/README.md @@ -64,6 +64,10 @@ To just run the unit tests without integration tests, add the It's also possible to only run the tests for one of the subprojects. You can use `build.sh` in the subdirectory for that. +Unit tests should be named after the file/class they are testing and +follow the pattern `*.tests.` (e.g. `keymanutil.tests.c`) or +for Python `*_tests.py`. + ### ibus-keyman If you want to run the ibus-keyman tests with Wayland, you'll have to diff --git a/docs/linux/keyman-config.md b/docs/linux/keyman-config.md index 93ed3ffd8bf..1a039d0f5e0 100644 --- a/docs/linux/keyman-config.md +++ b/docs/linux/keyman-config.md @@ -200,7 +200,7 @@ LANGUAGE=de ./km-config "python.testing.unittestArgs": [ "-v", "-s", "linux/keyman-config/tests", - "-p", "test_*.py" + "-p", "*_tests.py" ], "python.testing.unittestEnabled": true, ``` diff --git a/docs/settings/linux/launch.json b/docs/settings/linux/launch.json index e29c16fa451..fec5afe0ade 100644 --- a/docs/settings/linux/launch.json +++ b/docs/settings/linux/launch.json @@ -62,7 +62,7 @@ "request": "launch", "name": "Launch ibus-keyman unit tests", "target": "./keymanutil_tests", - "cwd": "${workspaceFolder}/linux/build/x86_64/debug/src/test", + "cwd": "${workspaceFolder}/linux/build/x86_64/debug/src/tests", "valuesFormatting": "parseText", "internalConsoleOptions": "openOnSessionStart", "env": { diff --git a/docs/settings/linux/settings.json b/docs/settings/linux/settings.json index 482630bdec7..3fd13430d1b 100644 --- a/docs/settings/linux/settings.json +++ b/docs/settings/linux/settings.json @@ -5,7 +5,7 @@ "python.testing.unittestArgs": [ "-v", "-s", "linux/keyman-config/tests", - "-p", "test_*.py" + "-p", "*_tests.py" ], "python.testing.unittestEnabled": true, "python.testing.pytestEnabled": false,