mirror of
https://github.com/ManimCommunity/manim.git
synced 2026-06-22 10:01:47 +00:00
* Future Annotations * Delete template_twitter_post.py * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Apply suggestions from code review * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fixed broken RTD Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
23 lines
565 B
Python
23 lines
565 B
Python
from __future__ import annotations
|
|
|
|
import inspect
|
|
import sys
|
|
|
|
|
|
def get_scenes_to_test(module_name):
|
|
"""Get all Test classes of the module from which it is called. Used to fetch all the SceneTest of the module.
|
|
|
|
Parameters
|
|
----------
|
|
module_name : :class:`str`
|
|
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,
|
|
)
|