Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-5561

Write tech note on modifications required to use py.test framework

    Details

    • Story Points:
      10
    • Team:
      Architecture

      Description

      Following the investigatory work into switching our Python test files to be compliant with pytest, whilst still using unittest, a tech note needs to be written explaining the required changes.

        Attachments

          Issue Links

            Activity

            Hide
            tjenness Tim Jenness added a comment -

            John Swinbank I am pretty happy with the testExecutables code. It's an easy drop in to most packages. Yes, sconsUtils would have to be taught to ignore anything that doesn't have .py suffix, else you'd run the tests twice. Maybe we could have a transition step where people can copy in the testExecutables.py file from utils and we just run tests twice. Then when every package has been modified we modify sconsUtils. afw will need to have a bespoke version of testExecutables.py in order to pass the arguments through to those two commands.

            The alternative is a big bang ticket where we change every package to use testExecutables.py and fix sconsUtils simultaneously.

            Show
            tjenness Tim Jenness added a comment - John Swinbank I am pretty happy with the testExecutables code. It's an easy drop in to most packages. Yes, sconsUtils would have to be taught to ignore anything that doesn't have .py suffix, else you'd run the tests twice. Maybe we could have a transition step where people can copy in the testExecutables.py file from utils and we just run tests twice. Then when every package has been modified we modify sconsUtils . afw will need to have a bespoke version of testExecutables.py in order to pass the arguments through to those two commands. The alternative is a big bang ticket where we change every package to use testExecutables.py and fix sconsUtils simultaneously.
            Hide
            tjenness Tim Jenness added a comment -

            Russell Owen, John Swinbank I'm ready to merge this. I've cleaned up the commits and done a Jenkins build (now that psutil is allowed) and SQR-012 is ready. Do either of you want to take one last look before I merge?

            Show
            tjenness Tim Jenness added a comment - Russell Owen , John Swinbank I'm ready to merge this. I've cleaned up the commits and done a Jenkins build (now that psutil is allowed) and SQR-012 is ready. Do either of you want to take one last look before I merge?
            Hide
            rowen Russell Owen added a comment -

            It was already really good. I feel no need to take another look.

            Show
            rowen Russell Owen added a comment - It was already really good. I feel no need to take another look.
            Hide
            swinbank John Swinbank added a comment -

            I was about to post much the same as Russell, but I think you've beaten me to it.

            Show
            swinbank John Swinbank added a comment - I was about to post much the same as Russell, but I think you've beaten me to it.
            Hide
            tjenness Tim Jenness added a comment -

            SQR-012 has been released and the associated changes to the utils package have been merged. The utils tests have been updated to use the new conventions.

            Show
            tjenness Tim Jenness added a comment - SQR-012 has been released and the associated changes to the utils package have been merged. The utils tests have been updated to use the new conventions.

              People

              • Assignee:
                tjenness Tim Jenness
                Reporter:
                tjenness Tim Jenness
                Reviewers:
                Russell Owen
                Watchers:
                John Swinbank, Jonathan Sick, Michael Wood-Vasey, Russell Owen, Tim Jenness
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Summary Panel