Skip to content

Commit fa5c725

Browse files
committed
tests: skip graphical test when cairo is old
1 parent b7edd7f commit fa5c725

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

manim/utils/testing/frames_comparison.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
from pathlib import Path
66
from typing import Callable
77

8+
import cairo
9+
import pytest
810
from _pytest.fixtures import FixtureRequest
911

1012
from manim import Scene
@@ -81,6 +83,9 @@ def decorator_maker(tested_scene_construct):
8183
@functools.wraps(tested_scene_construct)
8284
# The "request" parameter is meant to be used as a fixture by pytest. See below.
8385
def wrapper(*args, request: FixtureRequest, tmp_path, **kwargs):
86+
# check for cairo version
87+
if renderer_class is CairoRenderer and cairo.cairo_version() < 11800:
88+
pytest.skip("Cairo version is too old. Skipping cairo graphical tests.")
8489
# Wraps the test_function to a construct method, to "freeze" the eventual additional arguments (parametrizations fixtures).
8590
construct = functools.partial(tested_scene_construct, *args, **kwargs)
8691

0 commit comments

Comments
 (0)