Skip to content

Commit

Permalink
tests: skip graphical test when cairo is old
Browse files Browse the repository at this point in the history
  • Loading branch information
naveen521kk committed Oct 24, 2023
1 parent b7edd7f commit fa5c725
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions manim/utils/testing/frames_comparison.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
from pathlib import Path
from typing import Callable

import cairo
import pytest
from _pytest.fixtures import FixtureRequest

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

Expand Down

0 comments on commit fa5c725

Please sign in to comment.