You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by pa...@apache.org on 2019/09/15 20:01:49 UTC

[beam] branch master updated: Add test for versioned encoding

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 8446745  Add test for versioned encoding
     new b9de43c  Merge pull request #9573 from pabloem/BEAM-1080
8446745 is described below

commit 8446745f7cfdfa5f43dee9d3362a36479b8930b1
Author: Pablo Estrada <pa...@apache.org>
AuthorDate: Sun Sep 15 10:24:05 2019 -0700

    Add test for versioned encoding
---
 .../python/apache_beam/runners/dataflow/internal/apiclient_test.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/sdks/python/apache_beam/runners/dataflow/internal/apiclient_test.py b/sdks/python/apache_beam/runners/dataflow/internal/apiclient_test.py
index 96e0276..fc465a3 100644
--- a/sdks/python/apache_beam/runners/dataflow/internal/apiclient_test.py
+++ b/sdks/python/apache_beam/runners/dataflow/internal/apiclient_test.py
@@ -628,6 +628,13 @@ class UtilTest(unittest.TestCase):
         Exception,
         apiclient._verify_interpreter_version_is_supported, pipeline_options)
 
+  def test_get_response_encoding(self):
+    encoding = apiclient.get_response_encoding()
+    version_to_encoding = {3: 'utf8',
+                           2: None}
+
+    assert encoding == version_to_encoding[sys.version_info[0]]
+
 
 if __name__ == '__main__':
   unittest.main()