aIbrahiim commented on code in PR #37647:
URL: https://github.com/apache/beam/pull/37647#discussion_r2904182635


##########
sdks/python/apache_beam/ml/inference/base_test.py:
##########
@@ -1157,10 +1155,9 @@ def test_run_inference_with_iterable_side_input(self):
               FakeModelHandler(), model_metadata_pcoll=side_input))
       test_pipeline.run()
 
-    self.assertTrue(
-        'PCollection of size 2 with more than one element accessed as a '
-        'singleton view. First two elements encountered are' in str(
-            e.exception))
+    msg = str(e.exception)
+    self.assertIn('singleton', msg, msg='Expected singleton view error')
+    self.assertIn('more than one', msg, msg='Expected multiple-elements error')

Review Comment:
   The test was failing in CI because it asserted on the exact exception 
message from pvalue.py so when the message was reworded or wrapped like by the 
runner or environment the assertion failed even though the right exception was 
still raised so i relaxed the assertion to check that the message contains 
""singleton" and "more than one" so we still verify the intended behavior which 
is multiple elements used as a singleton without the depending on the exact 
wording



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to