From f8d1e4edf362b2c3579e1613e318ccc761513a4a Mon Sep 17 00:00:00 2001 From: JKLeckr <11635283+JKLeckr@users.noreply.github.com> Date: Sun, 27 Jul 2025 19:57:19 -0500 Subject: [PATCH] Ignore .github dir in package test (#5098) Added comments for ignore code --- test/general/test_packages.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/general/test_packages.py b/test/general/test_packages.py index 32c7bdf4..1df6187e 100644 --- a/test/general/test_packages.py +++ b/test/general/test_packages.py @@ -8,7 +8,12 @@ class TestPackages(unittest.TestCase): to indicate full package rather than namespace package.""" import Utils + # Ignore directories with these names. + ignore_dirs = {".github"} + worlds_path = Utils.local_path("worlds") for dirpath, dirnames, filenames in os.walk(worlds_path): + # Drop ignored directories from dirnames, excluding them from walking. + dirnames[:] = [d for d in dirnames if d not in ignore_dirs] with self.subTest(directory=dirpath): self.assertEqual("__init__.py" in filenames, any(file.endswith(".py") for file in filenames))