Coverage for tests / constants.py: 100%

13 statements  

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

1"""Test constants for the lintro test suite. 

2 

3This module provides commonly used constants to avoid magic numbers 

4in test files and ensure consistency across tests. 

5""" 

6 

7from __future__ import annotations 

8 

9# ============================================================================= 

10# Exit Codes 

11# ============================================================================= 

12 

13EXIT_SUCCESS: int = 0 

14EXIT_FAILURE: int = 1 

15 

16# ============================================================================= 

17# Timeouts (in seconds) 

18# ============================================================================= 

19 

20# Default timeout for most tool operations 

21DEFAULT_TOOL_TIMEOUT: int = 30 

22 

23# Short timeout for quick operations (yamllint, etc.) 

24SHORT_TOOL_TIMEOUT: int = 15 

25 

26# Extended timeout for slower tools (pytest, etc.) 

27LONG_TOOL_TIMEOUT: int = 300 

28 

29# Integration test CLI timeout 

30CLI_TIMEOUT: int = 60 

31 

32# Quick CLI operations (version checks, etc.) 

33QUICK_CLI_TIMEOUT: int = 10 

34 

35# ============================================================================= 

36# Tool-Specific Timeouts 

37# ============================================================================= 

38 

39PYTEST_DEFAULT_TIMEOUT: int = 300 

40RUFF_DEFAULT_TIMEOUT: int = 30 

41YAMLLINT_DEFAULT_TIMEOUT: int = 15 

42 

43# ============================================================================= 

44# Test Limits 

45# ============================================================================= 

46 

47# Minimum expected number of tools in the registry 

48MIN_EXPECTED_TOOLS: int = 13 

49 

50# Default line length for tests 

51DEFAULT_LINE_LENGTH: int = 88