Uploaded image for project: 'Request For Comments'
  1. Request For Comments
  2. RFC-647

Add pytest-subtests to our standard packages

    Details

    • Type: RFC
    • Status: Implemented
    • Resolution: Done
    • Component/s: DM
    • Labels:
      None
    • Location:
      This RFC

      Description

      I propose that we add the pytest-subtests package https://github.com/pytest-dev/pytest-subtests to our standard suite of Python packages. This allows pytest to handle unittest's subTest method correctly: running all versions even if one fails.

      Without this add-on package pytest stops the test at the first failure, even if more subTest cases remain to be run. That is not a disaster, but it does mean that a test failure will not produce as much useful information as it ought to.

      This seems especially apropos given Paul Price's recent work with iterator support in unit tests: https://developer.lsst.io/python/testing.html#decorators-for-iteration

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                rowen Russell Owen
                Reporter:
                rowen Russell Owen
                Watchers:
                Brian Van Klaveren, Gabriele Comoretto, John Swinbank, Kian-Tat Lim, Krzysztof Findeisen, Russell Owen, Tim Jenness
              • Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Planned End:

                  Summary Panel