File: test_utils.py

package info (click to toggle)
cmyt 2.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,332 kB
  • sloc: python: 4,285; makefile: 8
file content (19 lines) | stat: -rw-r--r-- 469 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import pytest

import cmyt  # noqa: F401
from cmyt._utils import create_cmap_overview


mpl_compare = pytest.mark.skip


@mpl_compare
@pytest.mark.parametrize("subset", [None, ["pastel", "arbre", "algae"], ["pastel"]])
def test_overview_to_fig(subset):
    return create_cmap_overview(subset=subset, with_grayscale=True)


def test_save_overview_to_file(tmp_path):
    output = tmp_path / "tmp.png"
    create_cmap_overview(filename=output)
    assert output.is_file()