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

Tests in daf_persistence should skip properly

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: daf_persistence
    • Labels:
      None
    • Story Points:
      2
    • Team:
      Architecture

      Description

      Some of the tests in daf_persistence have a couple of problems that cause difficulties with modern test frameworks:

      1. unittest is not being used at all in some cases
      2. Skipping is done with a print and a sys.exit

      They need to be modernized.

        Attachments

          Issue Links

            Activity

            Hide
            tjenness Tim Jenness added a comment -

            Changes to the daf_persistence tests so that they all use unittest and they all skip properly if the db-auth.paf file is missing.

            Interesting oddity is that some tests fail if launched in one invocation of py.test if DbAuth.py is the first in the list of tests.

            Show
            tjenness Tim Jenness added a comment - Changes to the daf_persistence tests so that they all use unittest and they all skip properly if the db-auth.paf file is missing. Interesting oddity is that some tests fail if launched in one invocation of py.test if DbAuth.py is the first in the list of tests.
            Hide
            tjenness Tim Jenness added a comment -

            I have fixed the DbAuth.py problem. It was caused by the policy from that test not being reset and so affecting the later tests.

            Show
            tjenness Tim Jenness added a comment - I have fixed the DbAuth.py problem. It was caused by the policy from that test not being reset and so affecting the later tests.
            Hide
            npease Nate Pease [X] (Inactive) added a comment -

            looks fine. I didn't see a pull request so I created one, mostly to make it easy to diff (that's the right thing to do?). That gets closed automatically when you merge?

            Show
            npease Nate Pease [X] (Inactive) added a comment - looks fine. I didn't see a pull request so I created one, mostly to make it easy to diff (that's the right thing to do?). That gets closed automatically when you merge?
            Hide
            tjenness Tim Jenness added a comment -

            Thanks. Creating a PR is fine. I tend to leave it to the reviewer as sometimes people don't feel like making any comments.

            Show
            tjenness Tim Jenness added a comment - Thanks. Creating a PR is fine. I tend to leave it to the reviewer as sometimes people don't feel like making any comments.
            Hide
            tjenness Tim Jenness added a comment -

            PR merged.

            Show
            tjenness Tim Jenness added a comment - PR merged.

              People

              Assignee:
              tjenness Tim Jenness
              Reporter:
              tjenness Tim Jenness
              Reviewers:
              Nate Pease [X] (Inactive)
              Watchers:
              Kian-Tat Lim, Nate Pease [X] (Inactive), Tim Jenness
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Jenkins

                  No builds found.