You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by al...@apache.org on 2020/07/17 23:54:08 UTC

[beam] branch master updated: Relax to matchers to match display data from the specific tests, not from all options.

This is an automated email from the ASF dual-hosted git repository.

altay pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git


The following commit(s) were added to refs/heads/master by this push:
     new 39bc4d3  Relax to matchers to match display data from the specific tests, not from all options.
     new abf63e2  Merge pull request #12288 from aaltay/matchers
39bc4d3 is described below

commit 39bc4d3551be48892ce7b7d51bb8cda940e7426e
Author: Ahmet Altay <al...@google.com>
AuthorDate: Thu Jul 16 17:05:48 2020 -0700

    Relax to matchers to match display data from the specific tests, not from all options.
---
 sdks/python/apache_beam/transforms/display_test.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/sdks/python/apache_beam/transforms/display_test.py b/sdks/python/apache_beam/transforms/display_test.py
index 7d67c55..840fc6d 100644
--- a/sdks/python/apache_beam/transforms/display_test.py
+++ b/sdks/python/apache_beam/transforms/display_test.py
@@ -151,7 +151,7 @@ class DisplayDataTest(unittest.TestCase):
             'RuntimeValueProvider(option: float_flag,'
             ' type: float, default_value: None)')
     ]
-    hc.assert_that(items, hc.contains_inanyorder(*expected_items))
+    hc.assert_that(items, hc.has_items(*expected_items))
 
   def test_create_list_display_data(self):
     flags = ['--extra_package', 'package1', '--extra_package', 'package2']
@@ -159,7 +159,7 @@ class DisplayDataTest(unittest.TestCase):
     items = DisplayData.create_from_options(pipeline_options).items
     hc.assert_that(
         items,
-        hc.contains_inanyorder(
+        hc.has_items(
             DisplayDataItemMatcher(
                 'extra_packages', str(['package1', 'package2']))))
 
@@ -219,7 +219,7 @@ class DisplayDataTest(unittest.TestCase):
             key='static_string', value='static me!', namespace=nspace)
     ]
 
-    hc.assert_that(dd.items, hc.contains_inanyorder(*expected_items))
+    hc.assert_that(dd.items, hc.has_items(*expected_items))
 
   def test_drop_if_none(self):
     class MyDoFn(beam.DoFn):
@@ -236,7 +236,7 @@ class DisplayDataTest(unittest.TestCase):
         DisplayDataItemMatcher('some_val', 'something'),
         DisplayDataItemMatcher('nodef_val', True)
     ]
-    hc.assert_that(dd.items, hc.contains_inanyorder(*expected_items))
+    hc.assert_that(dd.items, hc.has_items(*expected_items))
 
   def test_subcomponent(self):
     class SpecialDoFn(beam.DoFn):
@@ -253,7 +253,7 @@ class DisplayDataTest(unittest.TestCase):
         DisplayDataItemMatcher('fn', SpecialDoFn, pardo_nspace)
     ]
 
-    hc.assert_that(dd.items, hc.contains_inanyorder(*expected_items))
+    hc.assert_that(dd.items, hc.has_items(*expected_items))
 
 
 # TODO: Test __repr__ function