Uploaded image for project: 'Beam'
  1. Beam
  2. BEAM-7836

Provide a way to exclude unit / integration tests with incompatible syntax from running under particular version of Python.

Details

    • Bug
    • Status: Resolved
    • P2
    • Resolution: Fixed
    • None
    • Not applicable
    • sdk-py-core, testing
    • None

    Description

      Beam currently runs Python tests in 4 version of Python: 2.7, 3.5, 3.6, 3.7. Some Python 3 tests may include code that is considered incorrect syntax in older versions of Python, and such test may break test suites that they are not intended for, see an example: [1]

      We use `exec` as work around in (very few) tests , example: [2], but it is less convenient to work with such code, for example it is harder to debug or work with in IDE.

      We should find best practices to deal with this problem and introduce a solution to the Beam .

      cc: markflyhigh, udim, yoshiki.obata

      [1] https://github.com/apache/beam/pull/8505#issuecomment-498441270
      [2] https://github.com/apache/beam/blob/6cf3b1133658e963b6cc23f780480c3359e79ad6/sdks/python/apache_beam/internal/pickler_test.py#L103

      Attachments

        Activity

          People

            udim Udi Meiri
            tvalentyn Valentyn Tymofieiev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: