u-boot-brain/test/py/tests
Stephen Warren d20e5e976f test/py: Provide custom IDs when parametrizing tests
When pytest generates the name for parametrized tests, simple parameter
values (ints, strings) get used directly, but more complex values such
as dicts are not handled. This yields test names such as:

    dfu[env__usb_dev_port0-env__dfu_config0]
    dfu[env__usb_dev_port0-env__dfu_config1]

Add some code to extract a custom fixture ID from the fixture values, so
that we end up with meaningful names such as:

    dfu[micro_b-emmc]
    dfu[devport2-ram]

If the boardenv file doesn't define custom names, the code falls back to
the old algorithm.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2016-01-28 21:01:24 -07:00
..
test_000_version.py test/py: use " for docstrings 2016-01-28 21:01:24 -07:00
test_dfu.py test/py: Provide custom IDs when parametrizing tests 2016-01-28 21:01:24 -07:00
test_env.py test/py: use " for docstrings 2016-01-28 21:01:24 -07:00
test_help.py test/py: use " for docstrings 2016-01-28 21:01:24 -07:00
test_hush_if_test.py test/py: use " for docstrings 2016-01-28 21:01:24 -07:00
test_md.py test/py: use " for docstrings 2016-01-28 21:01:24 -07:00
test_net.py test/py: Quote consistency 2016-01-28 21:01:24 -07:00
test_sandbox_exit.py test/py: use " for docstrings 2016-01-28 21:01:24 -07:00
test_shell_basics.py test/py: Quote consistency 2016-01-28 21:01:24 -07:00
test_sleep.py test/py: use " for docstrings 2016-01-28 21:01:24 -07:00
test_ums.py test/py: Provide custom IDs when parametrizing tests 2016-01-28 21:01:24 -07:00
test_unknown_cmd.py test/py: use " for docstrings 2016-01-28 21:01:24 -07:00