This is an automated email from the ASF dual-hosted git repository. damccorm pushed a commit to branch 33151-cp in repository https://gitbox.apache.org/repos/asf/beam.git
commit 7fd545b45ae5e523a320891a0bc3dcb10401a4e2 Author: claudevdm <[email protected]> AuthorDate: Mon Nov 18 13:53:17 2024 -0500 Use random gcs bucket name (#33151) * Use random gcs bucket name * Linter fixes --------- Co-authored-by: Claude <[email protected]> --- sdks/python/apache_beam/ml/transforms/base_test.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sdks/python/apache_beam/ml/transforms/base_test.py b/sdks/python/apache_beam/ml/transforms/base_test.py index df5bf826742..1a21f6caf7e 100644 --- a/sdks/python/apache_beam/ml/transforms/base_test.py +++ b/sdks/python/apache_beam/ml/transforms/base_test.py @@ -17,8 +17,10 @@ # pytype: skip-file import os +import secrets import shutil import tempfile +import time import typing import unittest from collections.abc import Sequence @@ -699,7 +701,7 @@ class TestJsonPickleTransformAttributeManager(unittest.TestCase): @unittest.skipIf(apiclient is None, 'apache_beam[gcp] is not installed.') def test_with_gcs_location_with_none_options(self): - path = 'gs://fake_path' + path = f"gs://fake_path_{secrets.token_hex(3)}_{int(time.time())}" with self.assertRaises(RuntimeError): self.attribute_manager.save_attributes( ptransform_list=[], artifact_location=path, options=None)
