mirror of
https://github.com/ManimCommunity/manim.git
synced 2026-06-22 10:01:47 +00:00
* Converted types in docstrings to type annotations * `isort .` * `black .` * Additional docstrings type annotation fixes Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
23 lines
555 B
Python
23 lines
555 B
Python
from __future__ import annotations
|
|
|
|
import inspect
|
|
import sys
|
|
|
|
|
|
def get_scenes_to_test(module_name: str):
|
|
"""Get all Test classes of the module from which it is called. Used to fetch all the SceneTest of the module.
|
|
|
|
Parameters
|
|
----------
|
|
module_name
|
|
The name of the module tested.
|
|
|
|
Returns
|
|
-------
|
|
List[:class:`type`]
|
|
The list of all the classes of the module.
|
|
"""
|
|
return inspect.getmembers(
|
|
sys.modules[module_name],
|
|
lambda m: inspect.isclass(m) and m.__module__ == module_name,
|
|
)
|