Core: update cx-Freeze to 8.0.0 & Worlds: fix packages missing __init__.py (#4773)

This commit is contained in:
Fabian Dill
2025-04-01 16:29:32 +02:00
committed by GitHub
parent a3666f2ae5
commit 4a3d23e0e6
19 changed files with 15 additions and 1 deletions

View File

@@ -19,7 +19,7 @@ from typing import Dict, Iterable, List, Optional, Sequence, Set, Tuple, Union
# This is a bit jank. We need cx-Freeze to be able to run anything from this script, so install it
requirement = 'cx-Freeze==7.2.0'
requirement = 'cx-Freeze==8.0.0'
try:
import pkg_resources
try:

View File

@@ -0,0 +1,14 @@
import unittest
import os
class TestPackages(unittest.TestCase):
def test_packages_have_init(self):
"""Test that all world folders containing .py files also have a __init__.py file,
to indicate full package rather than namespace package."""
import Utils
worlds_path = Utils.local_path("worlds")
for dirpath, dirnames, filenames in os.walk(worlds_path):
with self.subTest(directory=dirpath):
self.assertEqual("__init__.py" in filenames, any(file.endswith(".py") for file in filenames))

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File