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

lsst.verify.Measurement needs a useful __repr__()

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: verify
    • Labels:
      None
    • Story Points:
      1
    • Sprint:
      AP F21-4 (September)
    • Team:
      Alert Production
    • Urgent?:
      No

      Description

      Recently, Lee Kelvin had a test failure in faro on tiger at Princeton, and the report of the error was not particularly useful:

      self.assertEqual(result.measurement, expected)
      E           AssertionError: <lsst.verify.measurement.Measurement object at 0x2ae0fd88b820> != <lsst.verify.measurement.Measurement object at 0x2ae0fd88b550>
      

      This is because Measurement has a _str() but no repr_() and the latter is what is used in the python unittest error reporting (e.g. https://github.com/python/cpython/blob/main/Lib/unittest/util.py#L25 )

        Attachments

          Activity

          Hide
          krzys Krzysztof Findeisen added a comment -

          Hi Eli Rykoff, would you be able to review this? It's 50 lines total.

          Show
          krzys Krzysztof Findeisen added a comment - Hi Eli Rykoff , would you be able to review this? It's 50 lines total.

            People

            Assignee:
            krzys Krzysztof Findeisen
            Reporter:
            erykoff Eli Rykoff
            Reviewers:
            Eli Rykoff
            Watchers:
            Eli Rykoff, Krzysztof Findeisen, Lee Kelvin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                CI Builds

                No builds found.