This is an automated email from the ASF dual-hosted git repository.
pabloem 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 c8631cb Importing hamcrest dependency at matcher runtime
new 37dc031 Merge pull request #8778 from pabloem/hamcrest-in-matcher
c8631cb is described below
commit c8631cb7cedeb3fd6313e8e92525740af1e930cf
Author: pabloem <[email protected]>
AuthorDate: Thu Jun 6 13:12:26 2019 -0700
Importing hamcrest dependency at matcher runtime
---
sdks/python/apache_beam/testing/util.py | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/sdks/python/apache_beam/testing/util.py
b/sdks/python/apache_beam/testing/util.py
index 2e38d37..32c16db 100644
--- a/sdks/python/apache_beam/testing/util.py
+++ b/sdks/python/apache_beam/testing/util.py
@@ -25,9 +25,6 @@ import io
import tempfile
from builtins import object
-from hamcrest.core import assert_that as hamcrest_assert
-from hamcrest.library.collection import contains_inanyorder
-
from apache_beam import pvalue
from apache_beam.transforms import window
from apache_beam.transforms.core import Create
@@ -154,6 +151,8 @@ def matches_all(expected):
the elements of a single PCollection.
"""
def _matches(actual):
+ from hamcrest.core import assert_that as hamcrest_assert
+ from hamcrest.library.collection import contains_inanyorder
expected_list = list(expected)
hamcrest_assert(actual, contains_inanyorder(*expected_list))