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

str(Image) tests too strict about formatting

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: afw
    • Labels:

      Description

      While the changes introduced in DM-15682 passed formal testing, I discovered that they do not pass if afw is built against NumPy 1.13 – that version of numpy includes more whitespace in the array than the test expects:

      AssertionError: '[[0. 0.]\n [0. 0.]]' not found in '[[ 0.  0.]\n [ 0.  0.]], bbox=(minimum=(0, 0), maximum=(1, 1))'
      

      While the build failure can be worked around by upgrading NumPy to 1.14 or later (which will soon be required anyway), the consensus on #dm-build-problems was that any future formatting changes in NumPy would break the test again.

      Please modify the tests so that they're less sensitive to NumPy's formatting decisions, preferably while keeping some diagnostic of whether the array is included in the string.

        Attachments

          Issue Links

            Activity

            krzys Krzysztof Findeisen created issue -
            krzys Krzysztof Findeisen made changes -
            Field Original Value New Value
            Epic Link DM-14447 [ 80385 ]
            krzys Krzysztof Findeisen made changes -
            Link This issue relates to DM-15682 [ DM-15682 ]
            krzys Krzysztof Findeisen made changes -
            Priority Major [ 3 ] Critical [ 2 ]
            Parejkoj John Parejko made changes -
            Sprint AP F18-6 [ 751 ]
            Parejkoj John Parejko made changes -
            Status To Do [ 10001 ] In Progress [ 3 ]
            Parejkoj John Parejko made changes -
            Status In Progress [ 3 ] To Do [ 10001 ]
            Parejkoj John Parejko made changes -
            Watchers John Parejko, Krzysztof Findeisen [ John Parejko, Krzysztof Findeisen ] Jim Bosch, John Parejko, John Swinbank, Krzysztof Findeisen [ Jim Bosch, John Parejko, John Swinbank, Krzysztof Findeisen ]
            Parejkoj John Parejko made changes -
            Assignee John Parejko [ parejkoj ]
            swinbank John Swinbank made changes -
            Assignee John Swinbank [ swinbank ]
            swinbank John Swinbank made changes -
            Reviewers Krzysztof Findeisen [ krzys ]
            Status To Do [ 10001 ] In Review [ 10004 ]
            krzys Krzysztof Findeisen made changes -
            Status In Review [ 10004 ] Reviewed [ 10101 ]
            swinbank John Swinbank made changes -
            Resolution Done [ 10000 ]
            Status Reviewed [ 10101 ] Done [ 10002 ]

              People

              Assignee:
              swinbank John Swinbank
              Reporter:
              krzys Krzysztof Findeisen
              Reviewers:
              Krzysztof Findeisen
              Watchers:
              Jim Bosch, John Parejko, John Swinbank, Krzysztof Findeisen
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Jenkins

                  No builds found.