File tree 1 file changed +3
-7
lines changed
1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -158,19 +158,15 @@ def gbq_dataset(self):
158
158
self .client = _get_client ()
159
159
self .dataset = self .client .dataset (dataset_id )
160
160
161
- # Ensure previous test runs are removed
162
- self .client .delete_dataset (
163
- self .dataset , delete_contents = True , not_found_ok = True
164
- )
165
-
161
+ # Create the dataset if it doesn't already exist
166
162
self .client .create_dataset (bigquery .Dataset (self .dataset ), exists_ok = True )
167
163
168
164
table_name = "" .join (random .choices (string .ascii_lowercase , k = 10 ))
169
165
destination_table = f"{ dataset_id } .{ table_name } "
170
166
yield destination_table
171
167
172
- # Teardown Dataset
173
- self .client .delete_dataset ( self . dataset , delete_contents = True )
168
+ # Teardown tables created
169
+ self .client .delete_table ( destination_table , not_found_ok = True )
174
170
175
171
def test_roundtrip (self , gbq_dataset ):
176
172
destination_table = gbq_dataset
You can’t perform that action at this time.
0 commit comments