tests: use ids (#6145)

This commit is contained in:
Daniel Hahler 2019-11-07 14:43:46 +01:00 committed by GitHub
commit 19b2f4bb8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 5 deletions

View File

@ -1229,13 +1229,15 @@ raise ValueError()
@pytest.mark.parametrize(
"reason, description",
[
(
pytest.param(
"cause",
"The above exception was the direct cause of the following exception:",
id="cause",
),
(
pytest.param(
"context",
"During handling of the above exception, another exception occurred:",
id="context",
),
],
)

View File

@ -358,7 +358,7 @@ class TestAssert_reprcompare:
@pytest.mark.parametrize(
["left", "right", "expected"],
[
(
pytest.param(
[0, 1],
[0, 2],
"""
@ -368,8 +368,9 @@ class TestAssert_reprcompare:
+ [0, 2]
? ^
""",
id="lists",
),
(
pytest.param(
{0: 1},
{0: 2},
"""
@ -379,8 +380,9 @@ class TestAssert_reprcompare:
+ {0: 2}
? ^
""",
id="dicts",
),
(
pytest.param(
{0, 1},
{0, 2},
"""
@ -390,6 +392,7 @@ class TestAssert_reprcompare:
+ {0, 2}
? ^
""",
id="sets",
),
],
)