==================================================================== FAILURES ====================================================================
_______________________________________________________ DoFnTest.test_incomparable_default _______________________________________________________
self = <apache_beam.pipeline_test.DoFnTest testMethod=test_incomparable_default>
def test_incomparable_default(self):
class IncomparableType(object):
def __eq__(self, other):
raise RuntimeError()
def __ne__(self, other):
raise RuntimeError()
def __hash__(self):
raise RuntimeError()
# Ensure that we don't use default values in a context where they must be
# comparable (see BEAM-8301).
with TestPipeline() as pipeline:
pcoll = (
pipeline
| beam.Create([None])
| Map(lambda e, x=IncomparableType(): (e, type(x).__name__)))
> assert_that(pcoll, equal_to([(None, 'IncomparableType')]))
apache_beam/pipeline_test.py:816:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
apache_beam/pipeline.py:596: in __exit__
self.result = self.run()
apache_beam/testing/test_pipeline.py:112: in run
result = super().run(
apache_beam/pipeline.py:546: in run
return Pipeline.from_runner_api(
apache_beam/pipeline.py:573: in run
return self.runner.run_pipeline(self, self._options)
apache_beam/runners/direct/direct_runner.py:131: in run_pipeline
return runner.run_pipeline(pipeline, options)
apache_beam/runners/portability/fn_api_runner/fn_runner.py:199: in run_pipeline
self._latest_run_result = self.run_via_runner_api(
apache_beam/runners/portability/fn_api_runner/fn_runner.py:210: in run_via_runner_api
return self.run_stages(stage_context, stages)
apache_beam/runners/portability/fn_api_runner/fn_runner.py:395: in run_stages
stage_results = self._run_stage(
apache_beam/runners/portability/fn_api_runner/fn_runner.py:660: in _run_stage
self._run_bundle(
apache_beam/runners/portability/fn_api_runner/fn_runner.py:783: in _run_bundle
result, splits = bundle_manager.process_bundle(
apache_beam/runners/portability/fn_api_runner/fn_runner.py:1094: in process_bundle
result_future = self._worker_handler.control_conn.push(process_bundle_req)
apache_beam/runners/portability/fn_api_runner/worker_handlers.py:378: in push
response = self.worker.do_instruction(request)
apache_beam/runners/worker/sdk_worker.py:580: in do_instruction
return getattr(self, request_type)(
apache_beam/runners/worker/sdk_worker.py:611: in process_bundle
bundle_processor = self.bundle_processor_cache.get(
apache_beam/runners/worker/sdk_worker.py:441: in get
processor = bundle_processor.BundleProcessor(
apache_beam/runners/worker/bundle_processor.py:865: in __init__
op.setup()
apache_beam/runners/worker/operations.py:686: in setup
self.dofn_runner = common.DoFnRunner(
apache_beam/runners/common.py:1185: in __init__
self.do_fn_invoker = DoFnInvoker.create_invoker(
apache_beam/runners/common.py:423: in create_invoker
return PerWindowInvoker(
apache_beam/runners/common.py:561: in __init__
(core.DoFn.WindowParam in default_arg_values) or
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <apache_beam.pipeline_test.IncomparableType object at 0x7f4f09d28e80>, other = WindowParam
def __eq__(self, other):
> raise RuntimeError()
E RuntimeError
apache_beam/pipeline_test.py:801: RuntimeError