Coverage for tests / unit / tools / pydoclint / test_default_options.py: 100%

7 statements  

« prev     ^ index     » next       coverage.py v7.13.0, created at 2026-04-03 18:53 +0000

1"""Tests for pydoclint plugin default options.""" 

2 

3from __future__ import annotations 

4 

5import pytest 

6from assertpy import assert_that 

7 

8from lintro.tools.definitions.pydoclint import ( 

9 PYDOCLINT_DEFAULT_TIMEOUT, 

10 PydoclintPlugin, 

11) 

12 

13 

14@pytest.mark.parametrize( 

15 ("option_name", "expected_value"), 

16 [ 

17 ("timeout", PYDOCLINT_DEFAULT_TIMEOUT), 

18 ("quiet", True), 

19 ], 

20 ids=[ 

21 "timeout_equals_default", 

22 "quiet_is_true", 

23 ], 

24) 

25def test_default_options_values( 

26 pydoclint_plugin: PydoclintPlugin, 

27 option_name: str, 

28 expected_value: object, 

29) -> None: 

30 """Default options have correct values. 

31 

32 Args: 

33 pydoclint_plugin: The PydoclintPlugin instance to test. 

34 option_name: The name of the option to check. 

35 expected_value: The expected value for the option. 

36 """ 

37 assert_that( 

38 pydoclint_plugin.definition.default_options[option_name], 

39 ).is_equal_to(expected_value)