Skip to content

Commit

Permalink
Use random gcs bucket name (#33151)
Browse files Browse the repository at this point in the history
* Use random gcs bucket name

* Linter fixes

---------

Co-authored-by: Claude <[email protected]>
  • Loading branch information
claudevdm and Claude authored Nov 18, 2024
1 parent 0871f93 commit bff2cbb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sdks/python/apache_beam/ml/transforms/base_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -699,7 +701,7 @@ def test_mltransform_to_ptransform_wrapper(self):

@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)
Expand Down

0 comments on commit bff2cbb

Please sign in to comment.