Skip to content

Commit 62f5a34

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 4468c17 commit 62f5a34

File tree

3 files changed

+15
-7
lines changed

3 files changed

+15
-7
lines changed

src/_pytest/_io/pprint.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def __init__(
7575
7676
depth
7777
The maximum depth to print out nested structures.
78-
78+
7979
sort_dicts
8080
If true, dict keys are sorted.
8181

src/_pytest/assertion/util.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,11 @@ def _compare_eq_dict(
530530
f"Left contains {len_extra_left} more item{'' if len_extra_left == 1 else 's'}:"
531531
)
532532
explanation.extend(
533-
highlighter(pprint.pformat({k: left[k] for k in left if k in extra_left}, sort_dicts=False)).splitlines()
533+
highlighter(
534+
pprint.pformat(
535+
{k: left[k] for k in left if k in extra_left}, sort_dicts=False
536+
)
537+
).splitlines()
534538
)
535539
extra_right = set_right - set_left
536540
len_extra_right = len(extra_right)
@@ -539,7 +543,11 @@ def _compare_eq_dict(
539543
f"Right contains {len_extra_right} more item{'' if len_extra_right == 1 else 's'}:"
540544
)
541545
explanation.extend(
542-
highlighter(pprint.pformat({k: right[k] for k in right if k in extra_right}, sort_dicts=False)).splitlines()
546+
highlighter(
547+
pprint.pformat(
548+
{k: right[k] for k in right if k in extra_right}, sort_dicts=False
549+
)
550+
).splitlines()
543551
)
544552
return explanation
545553

testing/test_error_diffs.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -208,14 +208,14 @@ def test_this():
208208
"""
209209
> assert result == expected
210210
E AssertionError: assert {'d': 4, 'c': 3, 'b': 2, 'a': 1} == {'d': 4, 'c': 3, 'e': 5}
211-
E
211+
E
212212
E Common items:
213213
E {'d': 4, 'c': 3}
214214
E Left contains 2 more items:
215215
E {'b': 2, 'a': 1}
216216
E Right contains 1 more item:
217217
E {'e': 5}
218-
E
218+
E
219219
E Full diff:
220220
E {
221221
E 'd': 4,
@@ -239,15 +239,15 @@ def test_this():
239239
"""
240240
> assert result == expected
241241
E AssertionError: assert {'c': 3, 'd': 4, 'b': 2, 'a': 1} == {'d': 5, 'c': 3, 'b': 1}
242-
E
242+
E
243243
E Common items:
244244
E {'c': 3}
245245
E Differing items:
246246
E {'d': 4} != {'d': 5}
247247
E {'b': 2} != {'b': 1}
248248
E Left contains 1 more item:
249249
E {'a': 1}
250-
E
250+
E
251251
E Full diff:
252252
E {
253253
E - 'd': 5,

0 commit comments

Comments
 (0)