Uploaded image for project: 'Beam'
  1. Beam
  2. BEAM-1251 Python 3 Support
  3. BEAM-5622

Several tests fail on Python 3 with: Runtime type violation detected

    Details

    • Type: Sub-task
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: sdk-py-core
    • Labels:
      None

      Description

      ======================================================================
      FAIL: test_combine_runtime_type_check_violation_using_decorators (apache_beam.transforms.ptransform_test.PTransformTypeCheckTestCase)
      ----------------------------------------------------------------------
      Traceback (most recent call last):
      File "/usr/local/google/home/valentyn/projects/beam/clean_head/beam/sdks/python/apache_beam/transforms/ptransform_test.py", line 1543, in test_combine_runtime_type_check_violation_using_decorators
      "Runtime type violation detected within "
      File "/usr/local/google/home/valentyn/projects/beam/clean_head/beam/sdks/python/apache_beam/transforms/ptransform_test.py", line 911, in assertStartswith
      '"%s" does not start with "%s"' % (msg, prefix))
      AssertionError: False is not true : "Runtime type violation detected within Mul/CombinePerKey: Type-hint for return type violated. Expected an instance of <class 'int'>, instead found 25252525252525252525252525252525252525252525252525, an instance of <class 'str'>." does not start with "Runtime type violation detected within Mul/CombinePerKey: Type-hint for return type violated. Expected an instance of <type 'int'>, instead found"

      ======================================================================
      FAIL: test_combine_runtime_type_check_violation_using_methods (apache_beam.transforms.ptransform_test.PTransformTypeCheckTestCase)
      ----------------------------------------------------------------------
      Traceback (most recent call last):
      File "/usr/local/google/home/valentyn/projects/beam/clean_head/beam/sdks/python/apache_beam/transforms/ptransform_test.py", line 1597, in test_combine_runtime_type_check_violation_using_methods
      "Runtime type violation detected within "
      File "/usr/local/google/home/valentyn/projects/beam/clean_head/beam/sdks/python/apache_beam/transforms/ptransform_test.py", line 911, in assertStartswith
      '"%s" does not start with "%s"' % (msg, prefix))
      AssertionError: False is not true : "Runtime type violation detected within ParDo(SortJoin/KeyWithVoid): Type-hint for argument: 'v' violated. Expected an instance of <class 'str'>, instead found 0, an instance of <class 'int'>. [while running 'SortJoin/KeyWithVoid']" does not start with "Runtime type violation detected within ParDo(SortJoin/KeyWithVoid): Type-hint for argument: 'v' violated. Expected an instance of <type 'str'>, instead found 0, an instance of <type 'int'>."

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              tvalentyn Valentyn Tymofieiev
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: