File: test_list_fonts.py

package info (click to toggle)
manimpango 0.6.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,804 kB
  • sloc: python: 1,252; sh: 164; makefile: 18
file content (26 lines) | stat: -rw-r--r-- 639 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# -*- coding: utf-8 -*-
import sys

import pytest

import manimpango

from .test_fonts import font_lists_dict as font_lists


def test_whether_list():
    a = manimpango.list_fonts()
    assert type(a) is list
    assert len(a) > 0


@pytest.mark.skipif(
    sys.platform.startswith("linux") or sys.platform.startswith("darwin"),
    reason="names don't match for some reason.",
)
@pytest.mark.parametrize("font_file", font_lists)
def test_resgister_font_with_list(font_file):
    manimpango.register_font(str(font_file))
    a = manimpango.list_fonts()
    assert font_lists[font_file] in a
    manimpango.unregister_font(str(font_file))