mirror of
https://github.com/jeertmans/manim-slides.git
synced 2025-09-20 16:44:23 +08:00
chore(ci): enhance current lint rules (#289)
* chore(ci): enhance current lint rules * run linter * fix all warnings * fix(convert): release VideoCapture * fix(ci): properly close file * better tests * fix(ci): setup opengl * Revert "fix(ci): setup opengl" This reverts commit a33f53a1c04f909d7660f2b5221c763a9ef97d53. * fix(ci): skipif Windows in workflows * actually xfail
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
import os
|
||||
import random
|
||||
import shutil
|
||||
import subprocess
|
||||
@ -43,7 +44,13 @@ cli = pytest.mark.parametrize(
|
||||
["cli"],
|
||||
[
|
||||
[manim_cli],
|
||||
[manimgl_cli],
|
||||
pytest.param(
|
||||
manimgl_cli,
|
||||
marks=pytest.mark.xfail(
|
||||
sys.platform == "win32" and os.environ.get("GITHUB_WORKFLOWS"),
|
||||
reason="OpenGL cannot be installed on Windows in GitHub workflows",
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
|
||||
@ -89,7 +96,7 @@ def test_render_basic_slide(
|
||||
def assert_constructs(cls: type) -> type:
|
||||
class Wrapper:
|
||||
@classmethod
|
||||
def test_render(_) -> None:
|
||||
def test_render(_) -> None: # noqa: N804
|
||||
cls().construct()
|
||||
|
||||
return Wrapper
|
||||
@ -98,7 +105,7 @@ def assert_constructs(cls: type) -> type:
|
||||
def assert_renders(cls: type) -> type:
|
||||
class Wrapper:
|
||||
@classmethod
|
||||
def test_render(_) -> None:
|
||||
def test_render(_) -> None: # noqa: N804
|
||||
cls().render()
|
||||
|
||||
return Wrapper
|
||||
@ -118,7 +125,7 @@ class TestSlide:
|
||||
|
||||
@assert_renders
|
||||
class TestMultipleAnimationsInLastSlide(Slide):
|
||||
"""This is used to check against solution for issue #161."""
|
||||
"""Check against solution for issue #161."""
|
||||
|
||||
def construct(self) -> None:
|
||||
circle = Circle(color=BLUE)
|
||||
@ -135,7 +142,7 @@ class TestSlide:
|
||||
|
||||
@assert_renders
|
||||
class TestFileTooLong(Slide):
|
||||
"""This is used to check against solution for issue #123."""
|
||||
"""Check against solution for issue #123."""
|
||||
|
||||
def construct(self) -> None:
|
||||
circle = Circle(radius=3, color=BLUE)
|
||||
|
Reference in New Issue
Block a user