Skip to content
Snippets Groups Projects
Select Git revision
  • master default protected
  • early-display
  • variant-emmc-nvme-boot
  • 2023-01-25
  • v3
  • variant-emmc-nvme-boot
  • 2020-06-01
7 results

conftest.py

Blame
  • Forked from Reform / reform-boundary-uboot
    Source project has a limited visibility.
    • Stephen Warren's avatar
      d20e5e97
      test/py: Provide custom IDs when parametrizing tests · d20e5e97
      Stephen Warren authored
      
      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: default avatarStephen Warren <swarren@nvidia.com>
      Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
      d20e5e97
      History
      test/py: Provide custom IDs when parametrizing tests
      Stephen Warren authored
      
      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: default avatarStephen Warren <swarren@nvidia.com>
      Reviewed-by: default avatarSimon Glass <sjg@chromium.org>