@@ -238,6 +238,11 @@ def test_create_dataset(self):
238238 self .assertEqual (dataset .dataset_id , DATASET_ID )
239239 self .assertEqual (dataset .project , Config .CLIENT .project )
240240
241+ def test_create_dataset_max_time_travel_hours (self ):
242+ DATASET_ID = _make_dataset_id ("create_ci_dataset" )
243+ dataset = self .temp_dataset (DATASET_ID , max_time_travel_hours = 24 * 2 )
244+ self .assertEqual (int (dataset .max_time_travel_hours ), 24 * 2 )
245+
241246 def test_get_dataset (self ):
242247 dataset_id = _make_dataset_id ("get_dataset" )
243248 client = Config .CLIENT
@@ -2286,12 +2291,14 @@ def test_nested_table_to_arrow(self):
22862291 self .assertTrue (pyarrow .types .is_list (record_col [1 ].type ))
22872292 self .assertTrue (pyarrow .types .is_int64 (record_col [1 ].type .value_type ))
22882293
2289- def temp_dataset (self , dataset_id , location = None ):
2294+ def temp_dataset (self , dataset_id , * args , ** kwargs ):
22902295 project = Config .CLIENT .project
22912296 dataset_ref = bigquery .DatasetReference (project , dataset_id )
22922297 dataset = Dataset (dataset_ref )
2293- if location :
2294- dataset .location = location
2298+ if kwargs .get ("location" ):
2299+ dataset .location = kwargs .get ("location" )
2300+ if kwargs .get ("max_time_travel_hours" ):
2301+ dataset .max_time_travel_hours = kwargs .get ("max_time_travel_hours" )
22952302 dataset = helpers .retry_403 (Config .CLIENT .create_dataset )(dataset )
22962303 self .to_delete .append (dataset )
22972304 return dataset
0 commit comments