-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Experimental: fix 11 tests #3979
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
chopan050
merged 6 commits into
ManimCommunity:experimental
from
chopan050:exp-test-fixes
Oct 30, 2024
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
5dd81ca
Fix tests and verify Animation run time inside new run_time property …
chopan050 d41e7b8
test_boolean_ops
chopan050 e0a0b1c
Add run_time validation from main branch
chopan050 d4ce94d
Fix 2 tests in tests/module/mobject/mobject/test_mobject.py
chopan050 d9c57d6
Fix 2 tests in tests/module/mobject/text/test_text_mobject.py
chopan050 986db71
Manager in test_file_writer.py
chopan050 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,14 @@ | ||
from manim import manim_colors as col | ||
from manim.mobject.opengl.opengl_vectorized_mobject import OpenGLVMobject | ||
|
||
VMobject = OpenGLVMobject | ||
|
||
|
||
def test_vmobject_init(): | ||
vm = VMobject(col.RED) | ||
vm = OpenGLVMobject() | ||
assert vm.fill_color == [col.WHITE] | ||
assert vm.stroke_color == [col.WHITE] | ||
vm = OpenGLVMobject(color=col.RED) | ||
assert vm.fill_color == [col.RED] | ||
assert vm.stroke_color == [col.RED] | ||
vm = VMobject(col.GREEN, stroke_color=col.YELLOW) | ||
vm = OpenGLVMobject(fill_color=col.GREEN, stroke_color=col.YELLOW) | ||
assert vm.fill_color == [col.GREEN] | ||
assert vm.stroke_color == [col.YELLOW] | ||
vm = VMobject() | ||
assert vm.fill_color == [col.WHITE] | ||
assert vm.stroke_color == [col.WHITE] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,22 +5,22 @@ | |
|
||
def test_ghost_vectors_len_and_types(): | ||
manager = Manager(LinearTransformationScene) | ||
scene = manager.scene | ||
scene: LinearTransformationScene = manager.scene | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's interesting that we need this annotation - I thought it should be able to infer this already? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah. Honestly, I don't know why this happens. |
||
scene.leave_ghost_vectors = True | ||
|
||
# prepare vectors (they require a vmobject as their target) | ||
# Prepare vectors. They require a VMobject as their target. | ||
v1, v2 = Vector(RIGHT), Vector(RIGHT) | ||
v1.target, v2.target = Vector(UP), Vector(UP) | ||
|
||
# ghost_vector addition is in this method | ||
# Ghost_vector addition is in this method: | ||
scene.get_piece_movement((v1, v2)) | ||
|
||
ghosts = scene.get_ghost_vectors() | ||
assert len(ghosts) == 1 | ||
# check if there are two vectors in the ghost vector VGroup | ||
# Check if there are two vectors in the ghost vector VGroup. | ||
assert len(ghosts[0]) == 2 | ||
|
||
# check types of ghost vectors | ||
# Check types of ghost vectors. | ||
assert isinstance(ghosts, VGroup) | ||
assert isinstance(ghosts[0], VGroup) | ||
assert all(isinstance(x, Vector) for x in ghosts[0]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably get
frozen_frame
working instead of removing it from the test?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
frozen_frame
was no longer among the parameters of the newScene.wait()
, so I assumed that it would no longer be needed.I can put it there again, if it's necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that might be my fault actually - I think I might have wanted to replace it with
wait_until
?I guess for now until
wait_until
works this is fine.