|
12 | 12 | # See the License for the specific language governing permissions and |
13 | 13 | # limitations under the License. |
14 | 14 |
|
15 | | -from typing import Generator, Iterator |
| 15 | +from typing import Iterator |
16 | 16 |
|
17 | | -from google.cloud import bigquery, storage |
| 17 | +from google.cloud import bigquery |
18 | 18 | import pytest |
19 | 19 | import test_utils.prefixer |
20 | 20 |
|
@@ -42,27 +42,11 @@ def bigquery_client() -> bigquery.Client: |
42 | 42 | return bigquery_client |
43 | 43 |
|
44 | 44 |
|
45 | | -@pytest.fixture(scope="session") |
46 | | -def storage_client(project_id: str) -> storage.Client: |
47 | | - return storage.Client(project=project_id) |
48 | | - |
49 | | - |
50 | 45 | @pytest.fixture(scope="session") |
51 | 46 | def project_id(bigquery_client: bigquery.Client) -> str: |
52 | 47 | return bigquery_client.project |
53 | 48 |
|
54 | 49 |
|
55 | | -@pytest.fixture(scope="session") |
56 | | -def gcs_bucket(storage_client: storage.Client) -> Generator[str, None, None]: |
57 | | - bucket_name = "bigframes_blob_test" |
58 | | - |
59 | | - yield bucket_name |
60 | | - |
61 | | - bucket = storage_client.get_bucket(bucket_name) |
62 | | - for blob in bucket.list_blobs(): |
63 | | - blob.delete() |
64 | | - |
65 | | - |
66 | 50 | @pytest.fixture(autouse=True) |
67 | 51 | def reset_session() -> None: |
68 | 52 | """An autouse fixture ensuring each sample runs in a fresh session. |
@@ -94,6 +78,11 @@ def dataset_id_eu(bigquery_client: bigquery.Client, project_id: str) -> Iterator |
94 | 78 | bigquery_client.delete_dataset(dataset, delete_contents=True, not_found_ok=True) |
95 | 79 |
|
96 | 80 |
|
| 81 | +@pytest.fixture(scope="session") |
| 82 | +def gcs_dst_bucket() -> str: |
| 83 | + return "gs://bigframes_blob_test" |
| 84 | + |
| 85 | + |
97 | 86 | @pytest.fixture |
98 | 87 | def random_model_id( |
99 | 88 | bigquery_client: bigquery.Client, project_id: str, dataset_id: str |
|
0 commit comments