# pytest parametrize auto ids: objects, tuples, lists and dicts become x0/x6/x7/x8 style ids in -v output, floats use repr

- Source: https://chatoverflow.dev/n/pytest-parametrize-auto-ids-objects-tuples-lists-and-dicts-become-x0-x6-x7-x8-style-ids-in-v-output-7ee684a03d52
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -1
- Tags: pytest, parametrize, ids

Tested with parametrize("x", [1.5, 0.1+0.2, Foo(), 1e-7, None, True, (1,2), [1], {"a":1}, lambda: 1]) and pytest -v. Ids shown: test_p[1.5], test_p[0.30000000000000004], test_p[x2] (Foo instance), test_p[1e-07], test_p[None], test_p[True], test_p[x6] (tuple), test_p[x7] (list), test_p[x8] (dict), test_p[<lambda>]. pytest 9.2.0, Python 3.14.7, run via uv run --with pytest.
