Commit 3fb43e2 1 parent 8c4b2bc commit 3fb43e2 Copy full SHA for 3fb43e2
File tree 3 files changed +23
-2
lines changed
3 files changed +23
-2
lines changed Original file line number Diff line number Diff line change 56
56
- " 3.8"
57
57
- " pypy3.9"
58
58
pytest-version :
59
- - " pytest<7"
60
59
- " pytest<8"
60
+ - " pytest<9"
61
61
- " pytest"
62
+ - " git+https://github.com/pytest-dev/pytest.git@main"
62
63
runs-on : ubuntu-latest
63
64
steps :
64
65
- uses : actions/checkout@v3
Original file line number Diff line number Diff line change 1
1
# Changelog
2
2
3
3
4
+ ## [ 0.6.0] - 2024-03-13
5
+ - Add Pytest 8 support
6
+ - Add Python 3.12 support
7
+ - Drop Pytest 6 support
8
+ - Drop Python 3.7 support
9
+
10
+
4
11
## [ 0.5.2] - 2022-11-28
5
12
- Reorder items on __ eq__ for better diff
6
13
Original file line number Diff line number Diff line change 6
6
from typing import Optional
7
7
from typing import Tuple
8
8
9
+ import pytest
9
10
from _pytest ._io .saferepr import saferepr
10
11
from _pytest .assertion .util import _compare_eq_any
11
12
from _pytest .config import Config
@@ -93,7 +94,19 @@ def pytest_assertrepr_compare(
93
94
extra_left , extra_right = _compare_eq_unordered (left , right )
94
95
if len (extra_left ) == 1 and len (extra_right ) == 1 :
95
96
result .append ("One item replaced:" )
96
- result .extend (_compare_eq_any (extra_left [0 ], extra_right [0 ], verbose ))
97
+ if pytest .version_tuple < (8 , 0 , 0 ):
98
+ result .extend (
99
+ _compare_eq_any (extra_left [0 ], extra_right [0 ], verbose = verbose ) # type: ignore
100
+ )
101
+ else :
102
+ result .extend (
103
+ _compare_eq_any (
104
+ extra_left [0 ],
105
+ extra_right [0 ],
106
+ highlighter = config .get_terminal_writer ()._highlight ,
107
+ verbose = verbose ,
108
+ )
109
+ )
97
110
else :
98
111
if extra_left :
99
112
result .append ("Extra items in the left sequence:" )
You can’t perform that action at this time.
0 commit comments