File sitecustomize.py of Package failed_python-acitoolkit

# Compatibility shim for Python 3.13+: restore unittest.makeSuite removed in 3.13
# The test runner in this package (tests/acitoolkit_test.py) calls unittest.makeSuite(),
# which was removed from the unittest module in Python 3.13. Installing this small
# shim in the project root ensures it's available on sys.path at interpreter startup
# (site will import sitecustomize if present), providing backward compatibility
# without modifying the upstream test files.
import unittest

if not hasattr(unittest, "makeSuite"):
    def _compat_makeSuite(testcase):
        """
        Return a TestSuite for all tests in the given TestCase class.
        Provides behavior compatible with the old unittest.makeSuite API.
        """
        return unittest.TestLoader().loadTestsFromTestCase(testcase)

    # Expose as attribute to mimic older unittest API
    unittest.makeSuite = _compat_makeSuite
openSUSE Build Service is sponsored by