diff --git a/kitty_tests/main.py b/kitty_tests/main.py index 571b160ea..3985f9b0e 100644 --- a/kitty_tests/main.py +++ b/kitty_tests/main.py @@ -191,8 +191,8 @@ def run_go(packages: set[str], names: Sequence[str]) -> GoProc: go = go_exe() go_pkg_args = [f'github.com/kovidgoyal/kitty/{x}' for x in packages] cmd = [go, 'test', '--tags', 'testing', '-v', '-json'] - for name in names: - cmd.extend(('-run', name)) + if names: + cmd.extend(('-run', '^Test(?:' + '|'.join(re.escape(name) for name in names) + ')$')) cmd += go_pkg_args return GoProc(cmd)