"""
    distutilazy.tests
    -----------------

    Tests for distutilazy

    :license: MIT, see LICENSE for more details.
"""

import os

__all__ = ["test_util", "test_clean"]

for file_ in os.listdir(os.path.dirname(__file__)):
    if file_.startswith('test_') and file_.endswith('.py'):
        __all__.append(file_.rsplit('.py', 1)[0])

"""
    distutilazy.tests
    -----------------

    Tests for distutilazy

    :license: MIT, see LICENSE for more details.
"""

from os import path
import glob

test_modules = [path.splitext(path.basename(filename))[0] for filename in glob.glob(path.join(path.dirname(__file__), 'test*.py'))]
__all__ = test_modules

Improve detecting available test modules in test package
Improve detecting available test modules in test package

By using glob and path.splitext instead of manually iterating over files
in the directory and filtering out files based on their names.
