KhaninArtur commented on a change in pull request #16484:
URL: https://github.com/apache/beam/pull/16484#discussion_r803674591
##########
File path: playground/infrastructure/test_cd_helper.py
##########
@@ -127,3 +128,19 @@ def test__save_to_cloud_storage(mocker):
CDHelper()._save_to_cloud_storage([example])
write_to_os_mock.assert_called_with(example)
upload_blob_mock.assert_called_with(source_file="", destination_blob_name="")
+
+
+def test__write_default_example_path_to_local_fs(delete_temp_folder):
+ """
+ Test writing default example link of sdk to
+ the filesystem (in temp folder)
+ Args:
+ delete_temp_folder: python fixture to clean up temp folder
+ after method execution
+ """
+ sdk = Sdk.Name(SDK_GO)
+ default_example_path =
"SDK_GO\\PRECOMPILED_OBJECT_TYPE_EXAMPLE\\MinimalWordCount"
+ expected_result = str(pathlib.Path(sdk, Config.DEFAULT_PRECOMPILED_OBJECT))
+ cloud_path =
CDHelper()._write_default_example_path_to_local_fs(default_example_path)
+ assert cloud_path == expected_result
+ assert os.path.exists("temp\\" + cloud_path) is True
Review comment:
```suggestion
assert os.path.exists("temp\\" + cloud_path)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]