Skip to content

Commit 10c83c5

Browse files
cmnemoinicoddemus
authored andcommitted
fix(testing): correct expected and actual dictionary keys
1 parent 8af2566 commit 10c83c5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

testing/python/approx.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1050,8 +1050,8 @@ def test_strange_sequence(self):
10501050

10511051
def test_approx_dicts_with_mismatch_on_keys(self) -> None:
10521052
"""https://github.com/pytest-dev/pytest/issues/13816"""
1053-
expected = {"a": 1, "c": 3}
1054-
actual = {"a": 1, "b": 3}
1053+
expected = {"a": 1, "b": 3}
1054+
actual = {"a": 1, "c": 3}
10551055

10561056
with pytest.raises(
10571057
AssertionError,
@@ -1060,7 +1060,7 @@ def test_approx_dicts_with_mismatch_on_keys(self) -> None:
10601060
"expected dict_keys(['a', 'b']) but got dict_keys(['a', 'c'])"
10611061
),
10621062
):
1063-
assert expected == approx(actual)
1063+
assert actual == approx(expected)
10641064

10651065

10661066
class MyVec3: # incomplete

0 commit comments

Comments
 (0)