robertwb commented on a change in pull request #11335: [BEAM-9692]: Make 
CombineValues portable
URL: https://github.com/apache/beam/pull/11335#discussion_r407758508
 
 

 ##########
 File path: sdks/python/apache_beam/runners/dataflow/dataflow_runner_test.py
 ##########
 @@ -566,6 +566,19 @@ def test_get_default_gcp_region_ignores_error(
     result = runner.get_default_gcp_region()
     self.assertIsNone(result)
 
+  def test_combine_values_translation(self):
+    runner = DataflowRunner()
+
+    with beam.Pipeline(runner=runner,
+                       options=PipelineOptions(self.default_properties)) as p:
+      (  # pylint: disable=expression-not-assigned
+          p
+          | beam.Create([('a', [1, 2]), ('b', [3, 4])])
+          | beam.CombineValues(lambda v, _: sum(v)))
+
+    job_dict = json.loads(str(runner.job))
+    self.assertEqual(job_dict[u'steps'][1][u'kind'], u'CombineValues')
 
 Review comment:
   Asserting that it's the first step seems brittle, maybe just assert that 
there is some step that has this kind?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to