Skip to content

Commit 30d3231

Browse files
Add a tiny test
1 parent 9b10ae7 commit 30d3231

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

testing/python/metafunc.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -993,6 +993,14 @@ def test_parametrize_with_duplicate_values(self) -> None:
993993
assert metafunc._calls[2].indices == dict(x=0, y=2)
994994
assert metafunc._calls[3].indices == dict(x=2, y=0)
995995

996+
def test_parametrize_with_unhashable_duplicate_values(self) -> None:
997+
metafunc = self.Metafunc(lambda x: None)
998+
metafunc.parametrize(("x"), [[1], [2], [1]])
999+
assert len(metafunc._calls) == 3
1000+
assert metafunc._calls[0].indices == dict(x=0)
1001+
assert metafunc._calls[1].indices == dict(x=1)
1002+
assert metafunc._calls[2].indices == dict(x=2)
1003+
9961004
def test_high_scoped_parametrize_reordering(self, pytester: Pytester) -> None:
9971005
pytester.makepyfile(
9981006
"""

0 commit comments

Comments
 (0)