Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-4750

Future proof use of pytest in Impala environment

    Details

      Description

      We currently do a couple of things that will soon be deprecated in upcoming versions of pytest:

      1. In run-tests.py, we pass args to pytest.main() as a string, rather than a list. The preferred way to pass args is to use a list.
      2. Even though we --ignore certain directories that might contain classes or functions that confuse pytest's auto-discovery, we also import those classes (like TestDimension, and TestMatrix) into other modules, and later versions of pytest will see these imported classes as possible test classes. The fix is just to rename the classes by prepending them with Impala.

        Issue Links

          Activity

          Hide
          lv Lars Volker added a comment -

          I'm changing the "Fix Version/s" to 2.9 as part of a bulk edit. If you think this is wrong, please set the version to the correct one.

          Show
          lv Lars Volker added a comment - I'm changing the "Fix Version/s" to 2.9 as part of a bulk edit. If you think this is wrong, please set the version to the correct one.
          Show
          dknupp David Knupp added a comment - https://gerrit.cloudera.org/#/c/5794/
          Hide
          dknupp David Knupp added a comment -

          Example of the kind of warning that shows up when importing the TestDimension class:

          WC1 /data/dknupp/Impala/tests/query_test/test_cancellation.py cannot collect test class 'TestDimension' because it has a __init__ constructor
          
          Show
          dknupp David Knupp added a comment - Example of the kind of warning that shows up when importing the TestDimension class: WC1 /data/dknupp/Impala/tests/query_test/test_cancellation.py cannot collect test class 'TestDimension' because it has a __init__ constructor

            People

            • Assignee:
              dknupp David Knupp
              Reporter:
              dknupp David Knupp
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development