Coverage for lintro / parsers / pytest / models.py: 100%

12 statements  

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

1"""Data models for pytest parsing. 

2 

3This module contains dataclasses used to represent pytest output. 

4""" 

5 

6from __future__ import annotations 

7 

8from dataclasses import dataclass, field 

9 

10 

11@dataclass 

12class PytestSummary: 

13 """Summary statistics from pytest execution. 

14 

15 Attributes: 

16 total: Total number of tests run. 

17 passed: Number of tests that passed. 

18 failed: Number of tests that failed. 

19 skipped: Number of tests that were skipped. 

20 error: Number of tests that had errors (setup/teardown failures). 

21 xfailed: Number of tests that were expected to fail and did fail. 

22 xpassed: Number of tests that were expected to fail but passed. 

23 duration: Total execution duration in seconds. 

24 """ 

25 

26 total: int = field(default=0) 

27 passed: int = field(default=0) 

28 failed: int = field(default=0) 

29 skipped: int = field(default=0) 

30 error: int = field(default=0) 

31 xfailed: int = field(default=0) 

32 xpassed: int = field(default=0) 

33 duration: float = field(default=0.0)