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

Modify pipe_tasks tests to support pytest

    Details

    • Type: Story
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: pipe_tasks
    • Labels:
      None
    • Team:
      Data Release Production

      Description

      This ticket is for the work of migrating the pipe_tasks tests such that they run with the py.test test runner.

        Attachments

          Issue Links

            Activity

            Hide
            price Paul Price added a comment -

            Lauren MacArthur, are you able and willing to review this, please?

            The only thing of substance in the commits I made is testCoadds.py, which has extensive changes to work with pytest (not regenerating the test data for every test). Not sure if Vishal Kasliwal [X]'s changes are straightforward or not.

            I added a "fixup" commit which should be squashed before merging, but I didn't want to do that just yet because at least two of us are working on the same branch.

            pprice@lsst-dev:~/LSST/pipe/tasks (tickets/DM-7235) $ git sub
            commit 2f63198de8bf53e89b0534c4d5d81a2cad80d5b9
            Author: Vishal Kasliwal <vishal.kasliwal@gmail.com>
            Date:   Mon Aug 15 16:49:44 2016 -0400
             
                Update to use py.test framework
                
                This commit updates tests/testTask.py to use the py.test framework.
             
             tests/testMakeDiscreteSkyMap.py | 20 +++++---------------
             1 file changed, 5 insertions(+), 15 deletions(-)
             
            commit 722d6f51ed43c87a0801efa5115a2ab76d68720e
            Author: Vishal Kasliwal <vishal.kasliwal@gmail.com>
            Date:   Mon Aug 15 16:51:59 2016 -0400
             
                Clean up tests
                
                Autopep8'd the test file.
             
             tests/testMakeDiscreteSkyMap.py | 1 +
             1 file changed, 1 insertion(+)
             
            commit 95edb81d7fea92e9ee9a907266ced2df26616bf6
            Author: Vishal Kasliwal <vishal.kasliwal@gmail.com>
            Date:   Mon Aug 15 16:57:43 2016 -0400
             
                Clean up test
                
                Autopep8'd the test file & convert assertTrue to assertIsNotNone.
             
             tests/testPhotoCal.py | 4 ++--
             1 file changed, 2 insertions(+), 2 deletions(-)
             
            commit 162cb4453c73886cf35e1358bdc5b0e9b79a37d9
            Author: Vishal Kasliwal <vishal.kasliwal@gmail.com>
            Date:   Mon Aug 15 17:01:42 2016 -0400
             
                Clean up test
                
                Autopep8'd the test file.
             
             tests/testProcessCcd.py | 9 ++++++---
             1 file changed, 6 insertions(+), 3 deletions(-)
             
            commit 4f11c6d0b6903f4f3dee32ee55311afebf16bd2e
            Author: Vishal Kasliwal <vishal.kasliwal@gmail.com>
            Date:   Mon Aug 15 17:04:11 2016 -0400
             
                Update to use py.test framework
                
                This commit updates tests/testTask.py to use the py.test framework.
             
             tests/testRegister.py | 17 +++++++----------
             1 file changed, 7 insertions(+), 10 deletions(-)
             
            commit d3cce6f0be26c50129c4c0731d825b5016123f3a
            Author: Vishal Kasliwal <vishal.kasliwal@gmail.com>
            Date:   Mon Aug 15 17:20:34 2016 -0400
             
                Replace utilsTests with full form
                
                All usage of utilsTests in testMakeDiscreteSkyMap has been replaced
                with the full form lsst.utils.tests
             
             tests/testMakeDiscreteSkyMap.py | 8 ++++----
             1 file changed, 4 insertions(+), 4 deletions(-)
             
            commit 2362ccf24fb891f41501d5507983e27da44337f2
            Author: Vishal Kasliwal <vishal.kasliwal@gmail.com>
            Date:   Mon Aug 15 17:40:57 2016 -0400
             
                Update testScaleZeroPoint to py.test framework
                
                This commit updates the testScaleZeroPoint.py test to use the py.test
                framework.
             
             tests/testScaleZeroPoint.py | 24 +++++++-----------------
             1 file changed, 7 insertions(+), 17 deletions(-)
             
            commit 35f6de61f1986802f4e8cbde5fe80d61c8cc88c9
            Author: Vishal Kasliwal <vishal.kasliwal@gmail.com>
            Date:   Mon Aug 15 17:44:09 2016 -0400
             
                Update testSnapCombine to use py.test framework
                
                This commit updates testSnapCombine.py to use the py.test framework.
             
             tests/testSnapCombine.py | 20 ++++++++------------
             1 file changed, 8 insertions(+), 12 deletions(-)
             
            commit a03045d06ebec9c220391e0d22625d430a41c2bb
            Author: Vishal Kasliwal <vishal.kasliwal@gmail.com>
            Date:   Mon Aug 15 17:47:10 2016 -0400
             
                Clean up testSnapCombine to comply with LSST PEP8
                
                testSnapCombine has been claened up to comply with the LSST specific
                PEP8 using autopep8.
             
             tests/testSnapCombine.py | 3 ++-
             1 file changed, 2 insertions(+), 1 deletion(-)
             
            commit f672578c4cdd228251047d9dc8f59796bea3b0a0
            Author: Vishal Kasliwal <vishal.kasliwal@gmail.com>
            Date:   Mon Aug 15 17:50:02 2016 -0400
             
                Clean testScaleZeroPoint to comply with LSST PEP8
                
                testScaleZeroPoint has been cleaned to comply with PEP8 using autopep8.
             
             tests/testScaleZeroPoint.py | 1 +
             1 file changed, 1 insertion(+)
             
            commit e63b015de88213ae6c43e6a0d4f1093717c4a459
            Author: Vishal Kasliwal <vishal.kasliwal@gmail.com>
            Date:   Mon Aug 15 17:56:55 2016 -0400
             
                Update testTransform to use py.test framework
                
                testTransform.py has been updated to use to the py.test framework. It
                has also been cleaned with autopep8 to comply with LSST's version of
                the PEP8 standard.
             
             tests/testTransform.py | 22 +++++++++-------------
             1 file changed, 9 insertions(+), 13 deletions(-)
             
            commit 6c4e6637d3ef2981ea1d35a1f31abc0453a909f5
            Author: Vishal Kasliwal <vishal.kasliwal@gmail.com>
            Date:   Mon Aug 15 18:02:39 2016 -0400
             
                Update ticket-2155 to use py.test framework
                
                The ticket-2155 test has been updated to use the py.test framework. It
                has also been claened to comply with the LSST PEP8 style with autopep8.
                A usage of assertTrue has been replaced with assertGreater.
             
             tests/ticket-2155.py | 33 ++++++++++++++-------------------
             1 file changed, 14 insertions(+), 19 deletions(-)
             
            commit f96e5e92dd16e00e3a915ffe4ede63d5ccd955ca
            Author: Vishal Kasliwal <vishal.kasliwal@gmail.com>
            Date:   Mon Aug 15 18:45:22 2016 -0400
             
                Update wcsSelectImages to use the py.test framework
                
                wcsSelectImages has been updated to use the py.test farmeowrk and has
                been cleaned to comply with the LSST PEP8 standard using autopep8.
             
             tests/wcsSelectImages.py | 21 +++++++--------------
             1 file changed, 7 insertions(+), 14 deletions(-)
             
            commit 847ea1f2fb81699fe9da9961e9c61d69b66b7ac2
            Author: Paul Price <price@astro.princeton.edu>
            Date:   Mon Aug 15 16:47:55 2016 -0700
             
                Modify tests to support py.test
             
             tests/config.py                       | 19 ++++++++-----------
             tests/matchBackgrounds.py             | 26 +++++++++-----------------
             tests/testFakes.py                    | 14 ++++++--------
             tests/testFindAstrometryNetDataDir.py | 14 +++++++++++++-
             tests/testInterpImageTask.py          | 20 +++++++-------------
             5 files changed, 43 insertions(+), 50 deletions(-)
             
            commit bcb781cb6ebafdab44180d1559e5795a9708ba6e
            Author: Paul Price <price@astro.princeton.edu>
            Date:   Mon Aug 15 16:48:00 2016 -0700
             
                Modify testCoadds.py to support py.test
                
                This required extensive modifications so that the data creation
                happens only once.
             
             tests/testCoadds.py | 329 ++++++++++++++++++++++++----------------------------
             1 file changed, 152 insertions(+), 177 deletions(-)
             
            commit bbef10e075f51b1a925e2197cf80ed0b4f125137
            Author: Paul Price <price@astro.princeton.edu>
            Date:   Mon Aug 15 20:13:51 2016 -0500
             
                fixup! Modify testCoadds.py to support py.test
             
             tests/testCoadds.py | 23 +++++++++++------------
             1 file changed, 11 insertions(+), 12 deletions(-)
             
            commit b96a30690164808e0454cfaffe69f5966f68f8fc
            Author: Paul Price <price@astro.princeton.edu>
            Date:   Mon Aug 15 20:18:49 2016 -0500
             
                git: ignore cache generated by pytest
             
             .gitignore | 1 +
             1 file changed, 1 insertion(+)
            

            Show
            price Paul Price added a comment - Lauren MacArthur , are you able and willing to review this, please? The only thing of substance in the commits I made is testCoadds.py, which has extensive changes to work with pytest (not regenerating the test data for every test). Not sure if Vishal Kasliwal [X] 's changes are straightforward or not. I added a "fixup" commit which should be squashed before merging, but I didn't want to do that just yet because at least two of us are working on the same branch. pprice@lsst-dev:~/LSST/pipe/tasks (tickets/DM-7235) $ git sub commit 2f63198de8bf53e89b0534c4d5d81a2cad80d5b9 Author: Vishal Kasliwal <vishal.kasliwal@gmail.com> Date: Mon Aug 15 16:49:44 2016 -0400   Update to use py.test framework This commit updates tests/testTask.py to use the py.test framework.   tests/testMakeDiscreteSkyMap.py | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-)   commit 722d6f51ed43c87a0801efa5115a2ab76d68720e Author: Vishal Kasliwal <vishal.kasliwal@gmail.com> Date: Mon Aug 15 16:51:59 2016 -0400   Clean up tests Autopep8'd the test file.   tests/testMakeDiscreteSkyMap.py | 1 + 1 file changed, 1 insertion(+)   commit 95edb81d7fea92e9ee9a907266ced2df26616bf6 Author: Vishal Kasliwal <vishal.kasliwal@gmail.com> Date: Mon Aug 15 16:57:43 2016 -0400   Clean up test Autopep8'd the test file & convert assertTrue to assertIsNotNone.   tests/testPhotoCal.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)   commit 162cb4453c73886cf35e1358bdc5b0e9b79a37d9 Author: Vishal Kasliwal <vishal.kasliwal@gmail.com> Date: Mon Aug 15 17:01:42 2016 -0400   Clean up test Autopep8'd the test file.   tests/testProcessCcd.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)   commit 4f11c6d0b6903f4f3dee32ee55311afebf16bd2e Author: Vishal Kasliwal <vishal.kasliwal@gmail.com> Date: Mon Aug 15 17:04:11 2016 -0400   Update to use py.test framework This commit updates tests/testTask.py to use the py.test framework.   tests/testRegister.py | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-)   commit d3cce6f0be26c50129c4c0731d825b5016123f3a Author: Vishal Kasliwal <vishal.kasliwal@gmail.com> Date: Mon Aug 15 17:20:34 2016 -0400   Replace utilsTests with full form All usage of utilsTests in testMakeDiscreteSkyMap has been replaced with the full form lsst.utils.tests   tests/testMakeDiscreteSkyMap.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)   commit 2362ccf24fb891f41501d5507983e27da44337f2 Author: Vishal Kasliwal <vishal.kasliwal@gmail.com> Date: Mon Aug 15 17:40:57 2016 -0400   Update testScaleZeroPoint to py.test framework This commit updates the testScaleZeroPoint.py test to use the py.test framework.   tests/testScaleZeroPoint.py | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-)   commit 35f6de61f1986802f4e8cbde5fe80d61c8cc88c9 Author: Vishal Kasliwal <vishal.kasliwal@gmail.com> Date: Mon Aug 15 17:44:09 2016 -0400   Update testSnapCombine to use py.test framework This commit updates testSnapCombine.py to use the py.test framework.   tests/testSnapCombine.py | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-)   commit a03045d06ebec9c220391e0d22625d430a41c2bb Author: Vishal Kasliwal <vishal.kasliwal@gmail.com> Date: Mon Aug 15 17:47:10 2016 -0400   Clean up testSnapCombine to comply with LSST PEP8 testSnapCombine has been claened up to comply with the LSST specific PEP8 using autopep8.   tests/testSnapCombine.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)   commit f672578c4cdd228251047d9dc8f59796bea3b0a0 Author: Vishal Kasliwal <vishal.kasliwal@gmail.com> Date: Mon Aug 15 17:50:02 2016 -0400   Clean testScaleZeroPoint to comply with LSST PEP8 testScaleZeroPoint has been cleaned to comply with PEP8 using autopep8.   tests/testScaleZeroPoint.py | 1 + 1 file changed, 1 insertion(+)   commit e63b015de88213ae6c43e6a0d4f1093717c4a459 Author: Vishal Kasliwal <vishal.kasliwal@gmail.com> Date: Mon Aug 15 17:56:55 2016 -0400   Update testTransform to use py.test framework testTransform.py has been updated to use to the py.test framework. It has also been cleaned with autopep8 to comply with LSST's version of the PEP8 standard.   tests/testTransform.py | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-)   commit 6c4e6637d3ef2981ea1d35a1f31abc0453a909f5 Author: Vishal Kasliwal <vishal.kasliwal@gmail.com> Date: Mon Aug 15 18:02:39 2016 -0400   Update ticket-2155 to use py.test framework The ticket-2155 test has been updated to use the py.test framework. It has also been claened to comply with the LSST PEP8 style with autopep8. A usage of assertTrue has been replaced with assertGreater.   tests/ticket-2155.py | 33 ++++++++++++++------------------- 1 file changed, 14 insertions(+), 19 deletions(-)   commit f96e5e92dd16e00e3a915ffe4ede63d5ccd955ca Author: Vishal Kasliwal <vishal.kasliwal@gmail.com> Date: Mon Aug 15 18:45:22 2016 -0400   Update wcsSelectImages to use the py.test framework wcsSelectImages has been updated to use the py.test farmeowrk and has been cleaned to comply with the LSST PEP8 standard using autopep8.   tests/wcsSelectImages.py | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-)   commit 847ea1f2fb81699fe9da9961e9c61d69b66b7ac2 Author: Paul Price <price@astro.princeton.edu> Date: Mon Aug 15 16:47:55 2016 -0700   Modify tests to support py.test   tests/config.py | 19 ++++++++----------- tests/matchBackgrounds.py | 26 +++++++++----------------- tests/testFakes.py | 14 ++++++-------- tests/testFindAstrometryNetDataDir.py | 14 +++++++++++++- tests/testInterpImageTask.py | 20 +++++++------------- 5 files changed, 43 insertions(+), 50 deletions(-)   commit bcb781cb6ebafdab44180d1559e5795a9708ba6e Author: Paul Price <price@astro.princeton.edu> Date: Mon Aug 15 16:48:00 2016 -0700   Modify testCoadds.py to support py.test This required extensive modifications so that the data creation happens only once.   tests/testCoadds.py | 329 ++++++++++++++++++++++++---------------------------- 1 file changed, 152 insertions(+), 177 deletions(-)   commit bbef10e075f51b1a925e2197cf80ed0b4f125137 Author: Paul Price <price@astro.princeton.edu> Date: Mon Aug 15 20:13:51 2016 -0500   fixup! Modify testCoadds.py to support py.test   tests/testCoadds.py | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-)   commit b96a30690164808e0454cfaffe69f5966f68f8fc Author: Paul Price <price@astro.princeton.edu> Date: Mon Aug 15 20:18:49 2016 -0500   git: ignore cache generated by pytest   .gitignore | 1 + 1 file changed, 1 insertion(+)
            Hide
            price Paul Price added a comment -
            Show
            price Paul Price added a comment - Jenkins passed .
            Hide
            lauren Lauren MacArthur added a comment -

            Minor comments on the PR. Otherwise looks good.

            Show
            lauren Lauren MacArthur added a comment - Minor comments on the PR. Otherwise looks good.
            Hide
            vpk24 Vishal Kasliwal [X] (Inactive) added a comment -

            Merged to master...

            Show
            vpk24 Vishal Kasliwal [X] (Inactive) added a comment - Merged to master...

              People

              • Assignee:
                price Paul Price
                Reporter:
                price Paul Price
                Reviewers:
                Lauren MacArthur
                Watchers:
                Lauren MacArthur, Paul Price, Tim Jenness, Vishal Kasliwal [X] (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Summary Panel