beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From goe...@apache.org
Subject [beam] branch master updated: More flexible GBK tests.
Date Thu, 25 Mar 2021 18:18:00 GMT
This is an automated email from the ASF dual-hosted git repository.

goenka 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 26030bf  More flexible GBK tests.
     new e30c349  Merge pull request #14287 from robertwb/gbk-testing
26030bf is described below

commit 26030bfea03fd700560e771571094ff5394dc3bb
Author: Robert Bradshaw <robertwb@gmail.com>
AuthorDate: Fri Mar 19 16:49:18 2021 -0700

    More flexible GBK tests.
---
 sdks/python/apache_beam/transforms/ptransform_test.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/sdks/python/apache_beam/transforms/ptransform_test.py b/sdks/python/apache_beam/transforms/ptransform_test.py
index 2f2bb98..6b35818 100644
--- a/sdks/python/apache_beam/transforms/ptransform_test.py
+++ b/sdks/python/apache_beam/transforms/ptransform_test.py
@@ -35,6 +35,7 @@ from builtins import map
 from builtins import range
 from builtins import zip
 from functools import reduce
+from typing import Iterable
 from typing import Optional
 from unittest.mock import patch
 
@@ -2592,6 +2593,8 @@ def _sort_lists(result):
     return tuple(_sort_lists(e) for e in result)
   elif isinstance(result, dict):
     return {k: _sort_lists(v) for k, v in result.items()}
+  elif isinstance(result, Iterable) and not isinstance(result, str):
+    return sorted(result)
   else:
     return result
 

Mime
View raw message