Coverage for tests/conftest.py: 100%

3 statements  

« prev     ^ index     » next       coverage.py v7.11.1, created at 2026-03-27 20:23 -0700

1"""PyTest configuration.""" 

2 

3from _pytest.assertion import truncate 

4 

5truncate.DEFAULT_MAX_LINES = 40 

6truncate.DEFAULT_MAX_CHARS = 40 * 80 

7 

8 

9def pytest_assertrepr_compare( 

10 op, 

11 left, 

12 right, 

13): # pragma: nocover 

14 if ( 

15 isinstance(left, str) 

16 and isinstance(right, str) 

17 and "█" in right 

18 and op == "==" 

19 ): 

20 return [ 

21 "Big number string comparison doesn't match", 

22 "Got:", 

23 *left.splitlines(), 

24 "Expected:", 

25 *right.splitlines(), 

26 "", 

27 f"Repr Comparison: {left!r} != {right!r}", 

28 ] 

29 return None