You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by lc...@apache.org on 2020/04/15 15:40:26 UTC
[beam] branch master updated: [BEAM-9577] Fix test to create urls
from paths which are compatible with Windows.
This is an automated email from the ASF dual-hosted git repository.
lcwik 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 34326a2 [BEAM-9577] Fix test to create urls from paths which are compatible with Windows.
new ef6df74 Merge pull request #11420 from lukecwik/beam9577
34326a2 is described below
commit 34326a2db9bf7226b256b80a14ae97363f58df7e
Author: Luke Cwik <lc...@google.com>
AuthorDate: Tue Apr 14 15:09:28 2020 -0700
[BEAM-9577] Fix test to create urls from paths which are compatible with Windows.
Tested manually on a Windows VM with Python 3.7
---
sdks/python/apache_beam/runners/portability/artifact_service_test.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sdks/python/apache_beam/runners/portability/artifact_service_test.py b/sdks/python/apache_beam/runners/portability/artifact_service_test.py
index 14e8b8a..14993dc 100644
--- a/sdks/python/apache_beam/runners/portability/artifact_service_test.py
+++ b/sdks/python/apache_beam/runners/portability/artifact_service_test.py
@@ -36,6 +36,7 @@ import time
import unittest
import grpc
+from future.moves.urllib.parse import quote
from apache_beam.portability import common_urns
from apache_beam.portability.api import beam_artifact_api_pb2
@@ -327,7 +328,7 @@ class ArtifactServiceTest(unittest.TestCase):
url_dep = beam_runner_api_pb2.ArtifactInformation(
type_urn=common_urns.artifact_types.URL.urn,
type_payload=beam_runner_api_pb2.ArtifactUrlPayload(
- url='file://' + __file__).SerializeToString())
+ url='file:' + quote(__file__)).SerializeToString())
content = b''.join([
r.data for r in retrieval_service.GetArtifact(
beam_artifact_api_pb2.GetArtifactRequest(artifact=url_dep))