From 0bfda866870b9aafeb11cbd69fed08b15eb58d9a Mon Sep 17 00:00:00 2001 From: Krystine Sherwin <93062060+KrystalDelusion@users.noreply.github.com> Date: Thu, 16 Jul 2026 11:45:17 +1200 Subject: [PATCH] tests: Support .skip file SBY entires in a file named `.skip` are ignored from the current directory during collection. Useful for when you want to skip a file, but don't want to use the `skip_` prefix, such as when it's a docs example. --- tests/make/collect_tests.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/make/collect_tests.py b/tests/make/collect_tests.py index 9ac0df0..1416732 100644 --- a/tests/make/collect_tests.py +++ b/tests/make/collect_tests.py @@ -40,6 +40,15 @@ def collect(path): ): return + skip_files = [] + try: + with open(path / ".skip", "r") as f: + for line in f: + skip_files.append(line.rstrip()) + except FileNotFoundError: + # no .skip file + pass + checked_dirs.append(path) for entry in path.glob("*.sby"): filename = str(entry) @@ -50,6 +59,8 @@ def collect(path): continue if entry.with_suffix(".ivy").exists(): continue + if entry.stem in skip_files: + continue tests.append(entry) for entry in path.glob("*"): if entry.with_suffix(".sby").exists():