mirror of
https://github.com/ManimCommunity/manim.git
synced 2026-06-22 10:01:47 +00:00
* Refactored file architecture of graphical tests * removed tests_cache now useless * added show_diff helper flag * updated test data for TextMobjecttest * refactored set_test_scene * removed useless imports * added video comparison tools * improved tests helpers for devs * added small video tests (provisionnal) * small changes and cleanup * RUN BLACK SIR YES SIR * removed unused imports * improved docs * Apply suggestions from code review Co-authored-by: Leo Torres <dleonardotn@gmail.com> * updated tests from master. * RUN BLACK SIR YES SIR * fixed logging tests * fixed test name * rgb(0,0,0) * fixed tests * changed .npy data to fix test (hopefully) * removed bad control data. * aaand re added control data * Regenerate Reference data for TextMobject and Text tests. * Turn off fast-failing to see if tests pass anywhere * Use shell mode for logging test. (Fixes the failing logging test) * Merge branch 'master' into refactor-tests * Add OS Specific control data for Tex[t] tests on MacOS, Windows * Use old TextMobject reference data. * Add reference data for Linux. * Use reference data from Ubuntu for Linux tests. * Use @CorvidCanine's Text data and @leotrs's Tex[t]Mobject data. * removed hash comparison in video tests. * updated control data * updated helpers * removed useless comment * removed test_writing * updated tests * renamed tests * fixed tests * Re-add fail-fast * Apply suggestions from code review Co-authored-by: Pg Biel <9021226+PgBiel@users.noreply.github.com> * small docs mistake * Update tests/utils/video_tester.py Co-authored-by: Pg Biel <9021226+PgBiel@users.noreply.github.com> Co-authored-by: Leo Torres <dleonardotn@gmail.com> Co-authored-by: Aathish Sivasubrahmanian <aathish04@gmail.com> Co-authored-by: Hugues Devimeux <hugues.devimeux@gmail.com> Co-authored-by: Pg Biel <9021226+PgBiel@users.noreply.github.com>
21 lines
529 B
Python
21 lines
529 B
Python
import sys
|
|
import inspect
|
|
|
|
|
|
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,
|
|
)
|