Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions samples/snippets/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,17 @@ def gcs_bucket(storage_client: storage.Client) -> Generator[str, None, None]:
blob.delete()


@pytest.fixture(scope="session")
def gcs_bucket_snippets(storage_client: storage.Client) -> Generator[str, None, None]:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

naming nit: "gcs_snippet_bucket"

bucket_name = "bigframes_blob_test_snippet_with_data_wipeout"

yield bucket_name

bucket = storage_client.get_bucket(bucket_name)
for blob in bucket.list_blobs():
blob.delete()


@pytest.fixture(autouse=True)
def reset_session() -> None:
"""An autouse fixture ensuring each sample runs in a fresh session.
Expand Down
4 changes: 2 additions & 2 deletions samples/snippets/multimodal_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
# limitations under the License.


def test_multimodal_dataframe(gcs_bucket: str) -> None:
def test_multimodal_dataframe(gcs_bucket_snippets: str) -> None:
# destination folder must be in a GCS bucket that the BQ connection service account (default or user provided) has write access to.
dst_bucket = f"gs://{gcs_bucket}"
dst_bucket = f"gs://{gcs_bucket_snippets}"
# [START bigquery_dataframes_multimodal_dataframe_create]
import bigframes

Expand Down