text stringlengths 2.1k 15.6k |
|---|
check that config is correctly restored for k, v in original.items(): if isinstance(v, np.ndarray): np.testing.assert_allclose(config[k], v) else: assert config[k] == v @pytest.mark.parametrize( ("format", "expected_file_extension"), [ ("mp4", ".mp4"), ("webm", ".webm"), ("mov", ".mov"), ("gif", ".mp4"), ], ) def test_... |
are no exceptions when running a png without output""" config.write_to_movie = False config.disable_caching = True assert config.dry_run is True scene = MyScene() scene.render() def test_dry_run_with_png_format_skipped_animations(config, dry_run): """Test that there are no exceptions when running a png without output a... |
be saved in <>"} {"levelname": "DEBUG", "module": "hashing", "message": "Hashing ..."} {"levelname": "DEBUG", "module": "hashing", "message": "Hashing done in <> s."} {"levelname": "DEBUG", "module": "hashing", "message": "Hash generated : <>"} {"levelname": "DEBUG", "module": "cairo_renderer", "message": "List of the ... |
"1.000000", "nb_frames": "15", "pix_fmt": "yuv420p" } ] } ================================================ FILE: tests/control_data/videos_data/SceneWithSkipAnimations.json ================================================ { "name": "SceneWithSkipAnimations", "movie_metadata": { "codec_name": "h264", "width": 854, "heig... |
================================================ """Helpers for dev to set up new tests that use videos.""" from __future__ import annotations import json from pathlib import Path from typing import Any from manim import get_dir_layout, get_video_metadata, logger def get_section_dir_layout(dirpath: Path) -> list[str]: ... |
= CliRunner() result = runner.invoke(main, command, prog_name="manim") expected_output = f"""\ Manim Community v{__version__} Usage: manim plugins [OPTIONS] Manages Manim plugins. Options: -l, --list List available plugins. --help Show this message and exit. Made with <3 by Manim Community developers. """ assert dedent... |
anim_args is None: anim_args = {} self.remove_line() return Uncreate(self.line, **anim_args) dots_with_line = DotsWithLine() anim = dots_with_line.animate.remove_line().build() assert len(dots_with_line.submobjects) == 2 assert type(anim) is Uncreate def test_chaining_overridden_animate(): class DotsWithLine(VGroup): d... |
no animation must be active anymore. succession.interpolate(1.0) assert succession.active_index == 2 assert succession.active_animation is None succession.interpolate(1.2) assert succession.active_index == 2 assert succession.active_animation is None def test_succession_in_succession_timing(): """Test timing of nested ... |
FILE: tests/module/animation/test_creation.py ================================================ from __future__ import annotations import numpy as np import pytest from manim import AddTextLetterByLetter, Text def test_non_empty_text_creation(): """Check if AddTextLetterByLetter works for non-empty text.""" s = Text("He... |
path = a._convert_vmobject_to_skia_path(test_input) assert len(list(path.segments)) > 1 new_vmobject = a._convert_skia_path_to_vmobject(path) # for some reason there is an extra 4 points in new vmobject than original np.testing.assert_allclose(new_vmobject.points[:-4], test_input.points) ===============================... |
vertices and 4 edges" assert set(G.edges.keys()) == {(2, 3), (3, 4), (4, 5), (1, 5)} assert set(G._graph.edges()) == set(G.edges.keys()) removed_mobjects = G.remove_edges((2, 3), (3, 4), (4, 5), (1, 5)) assert len(removed_mobjects) == 4 assert str(G) == "Undirected graph on 5 vertices and 0 edges" assert set(G._graph.e... |
Graph([1, 2, 3], [(1, 2), (2, 3)]) G.change_layout(layout=layout) assert str(G) == "Undirected graph on 3 vertices and 2 edges" def test_tree_layout_no_root_error(): with pytest.raises(ValueError) as excinfo: G = Graph([1, 2, 3], [(1, 2), (2, 3)], layout="tree") assert str(excinfo.value) == "The tree layout requires th... |
2, 3]], 0, 2, "3"), ([[1], [2], [3]], 2, 0, "3"), ], ids=["2x2_00", "2x2_11", "1x3_02", "3x1_20"], ) def test_get_element(self, matrix_elements, row, column, expected_value_str): matrix = Matrix(matrix_elements) assert isinstance(matrix.get_columns()[column][row], MathTex) assert isinstance(matrix.get_rows()[row][colum... |
= ValueTracker(20.0) tracker -= 10.0 assert tracker.get_value() == 10.0 def test_value_tracker_truediv(): """Test ValueTracker.__truediv__()""" tracker = ValueTracker(5.0) tracker2 = tracker / 2.0 assert tracker2.get_value() == 2.5 def test_value_tracker_itruediv(): """Test ValueTracker.__itruediv__()""" tracker = Valu... |
def test_changing_Square_side_length_updates_the_square_appropriately(): sq = Square(side_length=1) sq.side_length = 3 assert sq.height == 3 assert sq.width == 3 def test_Square_side_length_consistent_after_scale_and_rotation(): sq = Square(side_length=1).scale(3).rotate(np.pi / 4) assert np.isclose(sq.side_length, 3) ... |
x_range, y_range = test_data x_start, x_end = x_range y_start, y_end = y_range plane = NumberPlane( x_range=x_range, y_range=y_range, # x_length = 7, axis_config={"include_numbers": True}, ) # normally these values would be need to be added by one to pass since there's an # overlapping pair of lines at the origin, but ... |
axis2 = NumberLine(x_range=[-2, 5], length=12) for axis in (axis1, axis2): assert np.linalg.norm(axis.get_unit_vector()) == axis.unit_size def test_decimal_determined_by_step(): """Checks that step size is considered when determining the number of decimal places. """ axis = NumberLine(x_range=[-2, 2, 0.5]) expected_dec... |
tick.height == elongated_tick_height if ind in [2, 7] else tick.height == default_tick_height ) for ind, tick in enumerate(nline.ticks) ) def test_ticks_not_generated_on_origin_for_axes(): axes = Axes( x_range=[-10, 10], y_range=[-10, 10], axis_config={"include_ticks": True}, ) x_axis_range = axes.x_axis.get_tick_range... |
child.add(*grandchildren[child]) mob.add(*list(grandchildren.keys())) family = mob.get_family() assert len(family) == 1 + 10 + 10 * 10 assert mob in family for c in grandchildren: assert c in family for gc in grandchildren[c]: assert gc in family def test_overlapping_family(): """Check that each member of the family is... |
added as submobjects of Mobject, " "but the value foo (at index 2) is of type str." ) assert len(obj.submobjects) == 0 def test_mobject_remove(): """Test Mobject.remove().""" obj = Mobject() to_remove = Mobject() obj.add(to_remove) obj.add(*(Mobject() for _ in range(10))) assert len(obj.submobjects) == 11 obj.remove(to... |
2 assert inner_rect.height == 1 assert inner_rect.depth == 0 ================================================ FILE: tests/module/mobject/mobject/test_opengl_metaclass.py ================================================ from __future__ import annotations from manim import Mobject from manim.mobject.opengl.opengl_compati... |
1.0, 0.0], [14.374988080480586, 1.0, 0.0], [13.524988331417841, 1.0, 0.0], [13.524988331417841, 1.0, 0.0], [4.508331116720995, 1.0, 0], [-4.508326097975995, 1.0, 0.0], [-13.524983312672841, 1.0, 0.0], [-13.524983312672841, 1.0, 0.0], [-14.374983061735586, 1.0, 0.0], [-15.274984567359079, 1.0, 0.0], [-15.274984567359079... |
DecimalNumber returns the correct font_size value after being scaled. """ num = DecimalNumber(0).scale(0.3) assert round(num.font_size, 5) == 14.4 def test_font_size_vs_scale(): """Test that scale produces the same results as .scale()""" num = DecimalNumber(0, font_size=12) num_scale = DecimalNumber(0).scale(1 / 4) ass... |
= Tex(str_part_1, str_part_2, str_part_3, str_part_4, arg_separator=separator) assert len(tex) == 4 assert len(tex[0]) == len("".join((str_part_1 + separator).split())) assert len(tex[1]) == len("".join((str_part_2 + separator).split())) assert len(tex[2]) == len("".join((str_part_3 + separator).split())) assert len(te... |
Path("media", "Tex", "da27670a37b08799.log").exists() ================================================ FILE: tests/module/mobject/text/test_text_mobject.py ================================================ from __future__ import annotations from contextlib import redirect_stdout from io import StringIO from manim.mobjec... |
one of the added objects is not an instance of VMobject, none of them should be added obj.add(VMobject(), Mobject()) assert str(add_vmob_and_mob_info.value) == ( "Only values of type VMobject can be added as submobjects of VMobject, " "but the value Mobject (at index 1) is of type Mobject. You can try " "adding this va... |
Mobject (at index 0 of parameter 1) is of type Mobject. You can try " "adding this value into a Group instead." ) def test_vgroup_init_with_iterable(): """Test VGroup instantiation with an iterable type.""" def type_generator(type_to_generate, n): return (type_to_generate() for _ in range(n)) def mixed_type_generator(m... |
You can try " "adding this value into a Group instead." ) assert len(obj.submobjects) == 1 # A VMobject or VGroup cannot contain itself. with pytest.raises(ValueError) as add_self_info: obj.add(obj) assert str(add_self_info.value) == ( "Cannot add VGroup as a submobject of itself (at index 0)." ) assert len(obj.submobj... |
= VGroup(a) assert vgroup[0] == a vgroup[0] = b assert vgroup[0] == b assert len(vgroup) == 1 def test_vgroup_item_assignment_at_correct_position(): """Test VGroup item-assignment adds to correct position for VMobjects""" n_items = 10 vgroup = VGroup() for _i in range(n_items): vgroup.add(VMobject()) new_obj = VMobject... |
0.0], [-0.46666667, -1.0, 0.0], [0.06666667, -1.0, 0.0], [0.6, -1.0, 0.0], ] ) np.testing.assert_allclose(sq.points, expected_points) ================================================ FILE: tests/module/scene/test_auto_zoom.py ================================================ from __future__ import annotations from manim... |
== {s, c} assert set(scene.camera.fixed_in_frame_mobjects) == {c} scene.add_fixed_orientation_mobjects(s) assert set(scene.camera.fixed_orientation_mobjects) == {s} scene.remove_fixed_orientation_mobjects(s) assert len(scene.camera.fixed_orientation_mobjects) == 0 ================================================ FILE: ... |
0, 0, 0], [1, 0, 0, 0, 0], [0, 1, 0, 0, 0], [0, 0, 1, 0, 0], [0, 0, 0, 1, 0], [0, 0, 0, 0, 1], ] ), one_third: np.array( [ [81, 0, 0, 0, 0], [54, 27, 0, 0, 0], [36, 36, 9, 0, 0], [24, 36, 18, 3, 0], [16, 32, 24, 8, 1], [16, 32, 24, 8, 1], [0, 24, 36, 18, 3], [0, 0, 36, 36, 9], [0, 0, 0, 54, 27], [0, 0, 0, 0, 81], ] ) /... |
0], [1, 3, 3, 1], [1, 3, 3, 1], [0, 2, 4, 2], [0, 0, 4, 4], [0, 0, 0, 8], ] ) / 8, 3: np.array( [ [27, 0, 0 0], [18, 9, 0, 0], [12, 12, 3, 0], [8, 12, 6, 1], [8, 12, 6, 1], [4, 12, 9, 2], [2, 9, 12, 4], [1, 6, 12, 8], [1, 6, 12, 8], [0, 3, 12, 12], [0, 0, 9, 18], [0, 0, 0, 27], ] ) / 27, 4: np.array( [ [64, 0, 0, 0], [... |
points, ) def test_get_subdivision_matrix() -> None: """Test that the memos in .:meth:`_get_subdivision_matrix` are being correctly generated. """ # Only for degrees up to 3! for degree in range(4): degree_dict = SUBDIVISION_MATRICES[degree] for n_divisions, subdivision_matrix in degree_dict.items(): nt.assert_allclose... |
/ 4, 0], [1, -3 / 2, 0], [1, -3 / 2, 0], [3, -9 / 4, 0], [5, -3, 0], ] ), ) def test_interpolate() -> None: """Test that :func:`interpolate` handles interpolation of both float and uint8 values.""" start = 127.0 end = 25.0 alpha = 0.2 val = interpolate(start, end, alpha) assert np.allclose(val, 106.6000000) start = np.... |
qx = Qux() assert len(manim_caplog.record_tuples) == 1 msg = _get_caplog_record_msg(manim_caplog) assert ( msg == "The class Qux has been deprecated since 0.7.0 and is expected to be removed after 0.9.0-rc2." ) assert qx.__doc__ == f"{doc_admonition}{msg}" def test_deprecate_class_msg(manim_caplog): """Test the depreca... |
later version. This method is useless." ) assert t.mid_func.__doc__ == f"Middle function in Top.{doc_admonition}{msg}" def test_deprecate_nested_class_until_and_replacement(manim_caplog): """Test the deprecation of a nested class (decorator with until and replacement arguments).""" n = Top().Nested() assert len(manim_c... |
parameters point2D_x and point2D_y of method Top.quux have been deprecated and may be removed in a later version." ) assert obj == {"point2D": (3, 5)} def test_deprecate_func_param_redirect_one_to_many(manim_caplog): """Test the deprecation of one method parameter and redirecting it to many.""" t = Top() obj1 = t.quuz(... |
o_ser = hashing.get_json(el) dict_o = json.loads(o_ser) # check if this is an int (it meant that the lkey has been hashed) assert int(list(dict_o.keys())[0]) def test_JSON_with_circular_references(): B = {1: 2} class A: def __init__(self): self.b = B B["circular_ref"] = A() o_ser = hashing.get_json(B) dict_o = json.loa... |
0x2 / 255, 0x3 / 255, 0x4 / 255)) nt.assert_array_equal(color.to_int_rgba(), (0x1, 0x2, 0x3, 0x4)) nt.assert_array_equal( color.to_rgba_with_alpha(0.5), (0x1 / 255, 0x2 / 255, 0x3 / 255, 0.5) ) nt.assert_array_equal( color.to_int_rgba_with_alpha(0.5), (0x1, 0x2, 0x3, int(0.5 * 255)) ) def test_to_hex() -> None: color =... |
0.0], [-0.24402, 0.33333, 0.91068, 0.0], [0.0, 0.0, 0.0, 1.0], ] ), 5, ), ) np.testing.assert_array_equal( np.round(rotation_about_z(np.pi / 3), 5), np.array( [ [0.5, -0.86603, 0.0], [0.86603, 0.5, 0.0], [0.0, 0.0, 1.0], ] ), ) np.testing.assert_array_equal( np.round(z_to_vector(np.array([1, 2, 3])), 5), np.array( [ [0... |
): template.add_to_document("dummy") def test_texcode_for_environment(): """Test that the environment is correctly extracted from the input""" # environment without arguments assert _texcode_for_environment("align*") == (r"\begin{align*}", r"\end{align*}") assert _texcode_for_environment("{align*}") == (r"\begin{align*... |
= 2 run_time = 2 with pytest.raises(ValueError, match="must be passed before"): s.animate.scale(scale_factor)(run_time=run_time) with pytest.raises(ValueError, match="must be passed before"): s.animate(run_time=run_time)(run_time=run_time).scale(scale_factor) ================================================ FILE: tests... |
= OpenGLVMobject() assert m.fill_color.to_hex() == "#FFFFFF" m.set_fill([PURE_BLUE, PURE_GREEN, PURE_RED]) assert m.get_fill_colors()[0].to_hex() == "#0000FF" assert m.get_fill_colors()[1].to_hex() == "#00FF00" assert m.get_fill_colors()[2].to_hex() == "#FF0000" def test_set_stroke_handles_lists_of_strs(using_opengl_re... |
= animation_group.anims_with_timings assert timings.tolist() == [(wait, 0.0, 1.0), (sqr_anim, 1.0, 2.0)] ================================================ FILE: tests/opengl/test_config_opengl.py ================================================ from __future__ import annotations import tempfile from pathlib import Path ... |
GREEN, ORANGE, RED, YELLOW from manim.utils.testing.frames_comparison import frames_comparison __module_test__ = "coordinate_system_opengl" def test_initial_config(using_opengl_renderer): """Check that all attributes are defined properly from the config.""" cs = CS() assert cs.x_range[0] == round(-config["frame_x_radiu... |
matches the y-axis""" axes = Axes(x_range=[-3, 3], y_range=[-3, 3]) curve = axes.plot( lambda x: 0.1 * x**3, x_range=(-3, 3, 0.001), colorscale=[BLUE, GREEN, YELLOW, ORANGE, RED], colorscale_axis=0, ) scene.add(axes, curve) @frames_comparison def test_gradient_line_graph_y_axis(scene, using_opengl_renderer): """Test th... |
gchild_common = OpenGLMobject(), OpenGLMobject(), OpenGLMobject() child1.add(gchild1, gchild_common) child2.add(gchild2, gchild_common) mob.add(child1, child2) family = mob.get_family() assert mob in family assert len(family) == 6 assert family.count(gchild_common) == 1 def test_shift_family(using_opengl_renderer): """... |
7 assert set(G.vertices.keys()) == {1, 2, 3, 4, 5, 42, 6, 7} assert set(G._graph.nodes()) == set(G.vertices.keys()) assert set(G.edges.keys()) == { (1, 2), (2, 3), (1, 3), (1, 42), (4, 5), (5, 6), (6, 7), } assert set(G._graph.edges()) == set(G.edges.keys()) def test_graph_remove_edges(using_opengl_renderer): G = Graph... |
got " + actual_decimal_places ) axis2 = NumberLine(x_range=[-1, 1, 0.25]) expected_decimal_places = 2 actual_decimal_places = axis2.decimal_number_config["num_decimal_places"] assert actual_decimal_places == expected_decimal_places, ( "Expected 1 decimal place but got " + actual_decimal_places ) def test_decimal_config... |
== 0 def test_opengl_mobject_remove(using_opengl_renderer): """Test OpenGLMobject.remove().""" obj = OpenGLMobject() to_remove = OpenGLMobject() obj.add(to_remove) obj.add(*(OpenGLMobject() for _ in range(10))) assert len(obj.submobjects) == 11 obj.remove(to_remove) assert len(obj.submobjects) == 10 obj.remove(to_remov... |
"VGroup, but the value 3.0 (at index 0 of parameter 0) is of type float." ) with pytest.raises(TypeError) as init_with_mob_info: VGroup(OpenGLMobject()) assert str(init_with_mob_info.value) == ( "Only values of type OpenGLVMobject can be added as submobjects of " "VGroup, but the value OpenGLMobject (at index 0 of para... |
0 of parameter 0) is of type int." ) assert len(obj.submobjects) == 1 # Plain OpenGLMobjects can't be added to a OpenGLVMobject if they're not # OpenGLVMobjects. Suggest adding them into an OpenGLGroup instead. with pytest.raises(TypeError) as add_mob_info: obj.add(OpenGLMobject()) assert str(add_mob_info.value) == ( "... |
o3) assert a.submobjects.pop() == o3 assert a.submobjects.pop() == o2 assert a.submobjects.pop() == o1 def test_vdict_init(using_opengl_renderer): """Test the VDict instantiation.""" # Test empty VDict VDict() # Test VDict made from list of pairs VDict([("a", OpenGLVMobject()), ("b", OpenGLVMobject()), ("c", OpenGLVMob... |
== 0 scene.add(OpenGLMobject()) assert len(scene.mobjects) == 1 scene.add(*(OpenGLMobject() for _ in range(10))) assert len(scene.mobjects) == 11 # Check that adding a mobject twice does not actually add it twice repeated = OpenGLMobject() scene.add(repeated) assert len(scene.mobjects) == 12 scene.add(repeated) assert ... |
is" str_part_4 = "me!" tex = Tex(str_part_1, str_part_2, str_part_3, str_part_4, arg_separator=separator) assert len(tex) == 4 assert len(tex[0]) == len("".join((str_part_1 + separator).split())) assert len(tex[1]) == len("".join((str_part_2 + separator).split())) assert len(tex[2]) == len("".join((str_part_3 + separat... |
2 in x_axis_range assert -2 in y_axis_range assert -1 in y_axis_range assert 0 not in y_axis_range assert 1 in y_axis_range assert 2 in y_axis_range ================================================ FILE: tests/opengl/test_unit_geometry_opengl.py ================================================ from __future__ import an... |
) scene.add(ax, x_label) @frames_comparison def test_get_y_axis_label(scene): ax = Axes(x_range=(0, 8), y_range=(0, 5), x_length=8, y_length=5) y_label = ax.get_y_axis_label( Tex("$y$-values").scale(0.65).rotate(90 * DEGREES), edge=LEFT, direction=LEFT, buff=0.3, ) scene.add(ax, y_label) @frames_comparison def test_axi... |
[-1, 0.75], color=RED) a2 = ax.get_area(f1, [-0.75, 1], bounded_graph=f2, color=GREEN) scene.add(ax, f1, f2, a1, a2) @frames_comparison def test_get_riemann_rectangles(scene, use_vectorized): ax = Axes(y_range=[-2, 10]) quadratic = ax.plot(lambda x: 0.5 * x**2 - 0.5, use_vectorized=use_vectorized) # the rectangles are ... |
@frames_comparison def test_animationgroup_is_passing_remover_to_animations(scene): animation_group = AnimationGroup(Create(Square()), Write(Circle()), remover=True) scene.play(animation_group) scene.wait(0.1) @frames_comparison def test_animationgroup_is_passing_remover_to_nested_animationgroups(scene): animation_grou... |
@frames_comparison(last_frame=False) def test_DrawBorderThenFill(scene): square = Square(fill_opacity=1) scene.play(DrawBorderThenFill(square)) # NOTE : Here should be the Write Test. But for some reasons it appears that this function is untestable (see issue #157) @frames_comparison(last_frame=False) def test_FadeOut(... |
square = Square(side_length=1.7).set_fill(BLUE, opacity=1) triangle = Triangle().set_fill(GREEN, opacity=1) square.z_index = 0 triangle.z_index = 1 circle.z_index = 2 scene.play(FadeIn(VGroup(circle, square, triangle))) scene.play(ApplyMethod(circle.shift, UP)) scene.play(ApplyMethod(triangle.shift, 2 * UP)) @frames_co... |
three_arrows = SVGMobject(get_svg_resource("inheritance_test.svg")).scale(0.5) scene.add(three_arrows) scene.wait() @frames_comparison def test_MultiPartPath(scene): mpp = SVGMobject(get_svg_resource("multi_part_path.svg")) scene.add(mpp) scene.wait() @frames_comparison def test_QuadraticPath(scene): quad = SVGMobject(... |
Square() scene.add(square) scene.play(Indicate(square)) @frames_comparison(last_frame=False) def test_Flash(scene): square = Square() scene.add(square) scene.play(Flash(ORIGIN)) @frames_comparison(last_frame=False) def test_Circumscribe(scene): square = Square() scene.add(square) scene.play(Circumscribe(square)) scene.... |
import OpenGLRenderer from manim.utils.testing.frames_comparison import frames_comparison __module_test__ = "opengl" @frames_comparison(renderer_class=OpenGLRenderer, renderer="opengl") def test_Circle(scene): circle = Circle().set_color(RED) scene.add(circle) scene.wait() @frames_comparison( renderer_class=OpenGLRende... |
a.animate(run_time=0.5, rate_func=linear).shift(RIGHT * 4), b.animate(run_time=0.5, rate_func=rush_from).shift(RIGHT * 4), ), speedinfo={0.3: 1, 0.4: 0.1, 0.6: 0.1, 1: 1}, affects_speed_updaters=False, ), ) scene.play( ChangeSpeed( AnimationGroup( a.animate(run_time=0.5, rate_func=linear).shift(LEFT * 4), b.animate(run... |
scene.set_camera_orientation(phi=75 * DEGREES, theta=-45 * DEGREES) text = Tex("This is a 3D tex") scene.add_fixed_in_frame_mobjects(text) @frames_comparison(base_scene=ThreeDScene) def test_Cube(scene): scene.add(Cube()) @frames_comparison(base_scene=ThreeDScene) def test_Sphere(scene): scene.add(Sphere()) @frames_com... |
VGroup(*(Square() for _ in range(4))).arrange() scene.play( Rotate(s[0], -2 * TAU), Rotate(s[1], -1 * TAU), Rotate(s[2], 1 * TAU), Rotate(s[3], 2 * TAU), ) @frames_comparison(last_frame=False) def test_ClockwiseTransform(scene): square = Square() circle = Circle() scene.play(ClockwiseTransform(square, circle)) @frames_... |
================================================ from __future__ import annotations from manim import * from manim.utils.testing.frames_comparison import frames_comparison __module_test__ = "transform_matching_parts" @frames_comparison(last_frame=True) def test_TransformMatchingLeavesOneObject(scene): square = Square()... |
[Binary file] ================================================ FILE: tests/test_graphical_units/control_data/creation/DrawBorderThenFill.npz ================================================ [Binary file] ================================================ FILE: tests/test_graphical_units/control_data/creation/FadeIn.npz =... |
[Binary file] ================================================ FILE: tests/test_graphical_units/control_data/img_and_svg/SkewYTransform.npz ================================================ [Binary file] ================================================ FILE: tests/test_graphical_units/control_data/img_and_svg/SmoothCurv... |
[Binary file] ================================================ FILE: tests/test_graphical_units/control_data/tables/MobjectTable.npz ================================================ [Binary file] ================================================ FILE: tests/test_graphical_units/control_data/tables/Table.npz ============... |
{1 \\over k^2} = {\\pi^2 \\over 6}", ) group = VGroup(example_text, example_tex) group.arrange(DOWN) group.width = config["frame_width"] - 2 * LARGE_BUFF self.play(Write(example_text)) ================================================ FILE: tests/test_logging/test_logging.py =============================================... |
"plugin_name": plugin_name, } yield _create_plugin command = [python_version, "-m", "pip", "uninstall", plugin_name, "-y"] out, err, exit_code = capture(command) print(out) assert exit_code == 0, err ================================================ FILE: tests/test_scene_rendering/__init__.py ==========================... |
first automatically created section should be deleted <- it's empty self.next_section("create square") square = Square() self.play(FadeIn(square)) self.wait() self.next_section("transform to circle") circle = Circle() self.play(Transform(square, circle)) self.wait() # this section will be entirely skipped self.next_sec... |
import add_version_before_extension from ..utils.video_tester import video_comparison @pytest.mark.slow @video_comparison( "SquareToCircleWithDefaultValues.json", "videos/simple_scenes/1080p60/SquareToCircle.mp4", ) def test_basic_scene_with_default_values(tmp_path, manim_cfg_file, simple_scenes_path): scene_name = "Sq... |
flag did not render a file" filename = add_version_before_extension( tmp_path / "images" / "simple_scenes" / "SquareToCircle.png", ) assert np.asarray(Image.open(filename)).shape == (100, 200, 4) @pytest.mark.slow def test_a_flag(tmp_path, manim_cfg_file, infallible_scenes_path): command = [ sys.executable, "-m", "mani... |
) command = [ "-ql", "-s", "--media_dir", str(tmp_path), "-", ] runner = CliRunner() result = runner.invoke(main, command, input=code) assert result.exit_code == 0 exists = add_version_before_extension( tmp_path / "images" / "-" / "Test.png", ).exists() assert exists, result.output @pytest.mark.slow def test_gif_format... |
/ "simple_scenes" / "SquareToCircle0000.png" assert expected_png_path.exists(), "png file not found at " + str(expected_png_path) @pytest.mark.slow def test_images_are_zero_padded_when_zero_pad_set( tmp_path, manim_cfg_file, simple_scenes_path, ): """Test images are zero padded when --format png and --zero_pad n are se... |
not unexpected_webm_path.exists(), "unexpected webm file found at " + str( unexpected_webm_path, ) expected_mov_path = ( tmp_path / "videos" / "simple_scenes" / "480p15" / "SquareToCircle.mov" ) assert expected_mov_path.exists(), "expected .mov file not found at " + str( expected_mov_path, ) @pytest.mark.slow @video_co... |
"height": 480, "nb_frames": "30", "duration": "2.000000", "avg_frame_rate": "15/1", "codec_name": codec, "pix_fmt": pixel_format, } assert metadata == target_metadata with av.open(video_path) as container: if transparent and format == "webm": from av.codec.context import CodecContext context = CodecContext.create("libv... |
assert scene.mobject_update_count == 0 assert scene.scene_update_count == 0 def test_t_values_with_cached_data(using_temp_config): """Test the proper generation and use of the t values when an animation is cached.""" scene = SceneWithMultipleCalls() # Mocking the file_writer will skip all the writing process. scene.ren... |
================================================ from __future__ import annotations import sys import numpy as np import pytest from click.testing import CliRunner from PIL import Image from manim import capture, get_video_metadata from manim.__main__ import __version__, main from manim.utils.file_ops import add_versio... |
"simple_scenes").iterdir()) assert is_empty, ( "running manim static scene with interactive embed rendered an image" ) @pytest.mark.slow def test_no_default_image_output_with_non_static_scene( tmp_path, manim_cfg_file, simple_scenes_path ): scene_name = "SceneWithNonStaticWait" command = [ sys.executable, "-m", "manim"... |
(tmp_path / "videos").exists() assert not exists, "--custom_folders produced a 'videos/' dir" exists = add_version_before_extension(tmp_path / "SquareToCircle.png").exists() assert exists, "--custom_folders did not produce the output file" @pytest.mark.slow def test_dash_as_filename(tmp_path): code = ( "class Test(Scen... |
simple_scenes_path, ): """Test images are zero padded when --format png and --zero_pad n are set""" scene_name = "SquareToCircle" command = [ sys.executable, "-m", "manim", "--renderer", "opengl", "-ql", "--media_dir", str(tmp_path), "--format", "png", "--zero_pad", "3", str(simple_scenes_path), scene_name, ] out, err,... |
using_temp_opengl_config, force_window_config_write_to_movie, disabling_caching, ): """force_window creates window when write_to_movie is set""" scene = SquareToCircle() renderer = scene.renderer renderer.update_frame = Mock(wraps=renderer.update_frame) scene.render() assert renderer.window is not None assert_file_exis... |
scene.mobject_update_count == 0 assert scene.scene_update_count == 0 @pytest.mark.xfail(reason="Should be fixed in #2133") def test_t_values_with_cached_data(using_temp_opengl_config): """Test the proper generation and use of the t values when an animation is cached.""" scene = SceneWithMultipleCalls() # Mocking the fi... |
Callable[[Any], Any] The test wrapped with which we are going to make the comparison. """ control_data_file = Path(control_data_file) log_path_from_media_dir = Path(log_path_from_media_dir) def decorator(f): @wraps(f) def wrapper(*args, **kwargs): # NOTE : Every args goes seemingly in kwargs instead of args; this is pe... |
expected_distance @pytest.mark.parametrize( ("center", "h", "rings"), [ ( [2, 2], # center 1.0, # h [[[0, 0], [4, 0], [4, 4], [0, 4], [0, 0]]], # rings ), ( [3, 1.5], # center 0.5, # h [ [[1, 1], [5, 1], [5, 5], [1, 5], [1, 1]], [[2, 2], [2, 4], [4, 4], [4, 2], [2, 2]], ], # rings ), ], ) def test_cell(center, h, rings... |
= sec_dir_layout_gen - sec_dir_layout_exp ungen_exp = sec_dir_layout_exp - sec_dir_layout_gen if len(unexp_gen) or len(ungen_exp): dif = [f"'{dif}' got unexpectedly generated" for dif in unexp_gen] + [ f"'{dif}' didn't get generated" for dif in ungen_exp ] mismatch = "\n".join(dif) raise AssertionError(f"Sections don't... |
"physics", "dvisvgm", "jknapltx", "wasy", "cm-super", "babel-english", "gnu-freefont", "mathastext", "cbfonts-fd" ] } } ================================================ FILE: .github/PULL_REQUEST_TEMPLATE.md ================================================ <!-- Thank you for contributing to Manim! Learn more about the ... |
`tlmgr list --only-installed` for TeX Live or a screenshot of the Packages page for MikTeX --> </details> ## Additional comments <!-- Add further context that you think might be relevant for this issue here. --> ================================================ FILE: .github/ISSUE_TEMPLATE/feature_request.md ===========... |
- [ ] I have added a test case to prevent software regression <!-- Do not modify the lines below. These are for the reviewers of your PR --> ## Reviewer Checklist - [ ] The PR title is descriptive enough - [ ] The PR is labeled appropriately - [ ] Regression test(s) are implemented =====================================... |
logging.basicConfig(level=logging.INFO, format="%(asctime)s %(levelname)s %(message)s") logger = logging.getLogger(__name__) def is_ci(): return os.getenv("CI", None) is not None def download_file(url, path): logger.info(f"Downloading {url} to {path}") block_size = 1024 * 1024 with urllib.request.urlopen(url) as respon... |
citation metadata from CITATION.cff is valid uses: citation-file-format/cffconvert-github-action@2.0.0 with: args: "--validate" ================================================ FILE: .github/workflows/ci.yml ================================================ name: CI concurrency: group: ${{ github.ref }} cancel-in-progre... |
"https://github.com/yihui/tinytex-releases/releases/download/daily/TinyTeX-1.zip" -OutFile "$($env:TMP)\TinyTex.zip" Expand-Archive -LiteralPath "$($env:TMP)\TinyTex.zip" -DestinationPath "$($PWD)\ManimCache\LatexWindows" $env:Path = "$($PWD)\ManimCache\LatexWindows\TinyTeX\bin\windows;$($env:PATH)" tlmgr update --self... |
platforms: linux/arm64,linux/amd64 push: true file: docker/Dockerfile tags: | manimcommunity/manim:stable manimcommunity/manim:latest manimcommunity/manim:${{ steps.create_release.outputs.tag_name }} ================================================ FILE: .github/workflows/python-publish.yml ============================... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.