-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change tests to use the config fixture
- Loading branch information
1 parent
7d268bd
commit 926e962
Showing
19 changed files
with
396 additions
and
393 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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,20 +1,20 @@ | ||
from __future__ import annotations | ||
|
||
from manim import Mobject, config, tempconfig | ||
from manim import Mobject | ||
from manim.mobject.opengl.opengl_compatibility import ConvertToOpenGL | ||
from manim.mobject.opengl.opengl_mobject import OpenGLMobject | ||
|
||
|
||
def test_metaclass_registry(): | ||
def test_metaclass_registry(config): | ||
class SomeTestMobject(Mobject, metaclass=ConvertToOpenGL): | ||
pass | ||
|
||
assert SomeTestMobject in ConvertToOpenGL._converted_classes | ||
|
||
with tempconfig({"renderer": "opengl"}): | ||
assert OpenGLMobject in SomeTestMobject.__bases__ | ||
assert Mobject not in SomeTestMobject.__bases__ | ||
config.renderer = "opengl" | ||
assert OpenGLMobject in SomeTestMobject.__bases__ | ||
assert Mobject not in SomeTestMobject.__bases__ | ||
|
||
config.renderer = "cairo" | ||
assert Mobject in SomeTestMobject.__bases__ | ||
assert OpenGLMobject not in SomeTestMobject.__bases__ | ||
config.renderer = "cairo" | ||
assert Mobject in SomeTestMobject.__bases__ | ||
assert OpenGLMobject not in SomeTestMobject.__bases__ |
This file contains 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 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 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.