Use ids for parametrized values in test_expected_value_type_error

This commit is contained in:
Bruno Oliveira 2018-08-01 07:34:08 -03:00
parent 2a2f888909
commit 43664d7841
1 changed files with 9 additions and 1 deletions

View File

@ -444,7 +444,15 @@ class TestApprox(object):
)
@pytest.mark.parametrize(
"x", [None, "string", ["string"], [[1]], {"key": "string"}, {"key": {"key": 1}}]
"x",
[
pytest.param(None),
pytest.param("string"),
pytest.param(["string"], id="nested-str"),
pytest.param([[1]], id="nested-list"),
pytest.param({"key": "string"}, id="dict-with-string"),
pytest.param({"key": {"key": 1}}, id="nested-dict"),
],
)
def test_expected_value_type_error(self, x):
with pytest.raises(TypeError):