Coverage for tests / unit / utils / native_parsers / test_config_constants.py: 100%
8 statements
« prev ^ index » next coverage.py v7.13.0, created at 2026-04-03 18:53 +0000
« prev ^ index » next coverage.py v7.13.0, created at 2026-04-03 18:53 +0000
1"""Tests for config file list constants."""
3from __future__ import annotations
5import pytest
6from assertpy import assert_that
8from lintro.utils.native_parsers import (
9 MARKDOWNLINT_CONFIG_FILES,
10 YAMLLINT_CONFIG_FILES,
11)
14@pytest.mark.parametrize(
15 ("config_list", "expected_files"),
16 [
17 (YAMLLINT_CONFIG_FILES, [".yamllint", ".yamllint.yaml", ".yamllint.yml"]),
18 (
19 MARKDOWNLINT_CONFIG_FILES,
20 [
21 ".markdownlint.json",
22 ".markdownlint.yaml",
23 ".markdownlint.yml",
24 ".markdownlint.jsonc",
25 ],
26 ),
27 ],
28 ids=["yamllint_files", "markdownlint_files"],
29)
30def test_config_file_lists_contain_expected_files(
31 config_list: tuple[str, ...],
32 expected_files: list[str],
33) -> None:
34 """Verify config file list constants contain all expected filenames.
36 Args:
37 config_list: The config file list constant to check.
38 expected_files: List of filenames expected to be in the constant.
39 """
40 for expected_file in expected_files:
41 assert_that(config_list).contains(expected_file)