File: test_setup.py

package info (click to toggle)
displaycal-py3 3.9.17-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 29,124 kB
  • sloc: python: 115,810; javascript: 11,545; xml: 598; sh: 257; makefile: 173
file content (18 lines) | stat: -rw-r--r-- 560 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# -*- coding: utf-8 -+-
import os
import pytest

from DisplayCAL.setup import get_data


@pytest.mark.parametrize(
    "tgt_dir, key, pkgname, subkey, excludes",
    [["DisplayCAL", "doc", None, None, ["LICENSE.txt"]]],
)
def test_get_data_returns_relative_paths(tgt_dir, key, pkgname, subkey, excludes):
    """DisplayCAL.setup.get_data() returns relative paths."""
    result = get_data(tgt_dir, key, pkgname, subkey, excludes)
    all_paths = []
    for r in result:
        all_paths += r[1]
    assert all([not os.path.isabs(path) for path in all_paths])