Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sliu008 committed Jun 21, 2024
1 parent 8499389 commit db9a3a8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
4 changes: 0 additions & 4 deletions podaac/subsetter/subset.py
Original file line number Diff line number Diff line change
Expand Up @@ -1254,10 +1254,6 @@ def subset(file_to_subset: str, bbox: np.ndarray, output_file: str,
time_var_names=time_var_names
)

print("#############################################")
print(time_var_names)
print("#############################################")

start_date = None
if hdf_type and (min_time or max_time):
dataset, start_date = tc.convert_to_datetime(dataset, time_var_names, hdf_type)
Expand Down
7 changes: 4 additions & 3 deletions tests/test_subset.py
Original file line number Diff line number Diff line change
Expand Up @@ -1172,7 +1172,8 @@ def test_temporal_subset_modis_a(data_dir, subset_output_dir, request):
bbox=bbox,
output_file=join(subset_output_dir, output_file),
min_time=min_time,
max_time=max_time
max_time=max_time,
time_var_names=['sst_dtime']
)

in_ds = xr.open_dataset(join(data_dir, file),
Expand Down Expand Up @@ -1761,12 +1762,12 @@ def test_get_time_epoch_var(data_dir, subset_output_dir):
**args
) as dataset:
lat_var_names, _ = subset.compute_coordinate_variable_names(dataset)
time_var_names = []
time_var_names = ['__PRODUCT__time']
for lat_var_name in lat_var_names:
time_var_names.append(subset.compute_time_variable_name(
dataset, dataset[lat_var_name], time_var_names
))
epoch_time_var = subset.get_time_epoch_var(dataset, time_var_names[0])
epoch_time_var = subset.get_time_epoch_var(dataset, time_var_names[1])

assert epoch_time_var.split('__')[-1] == 'time'

Expand Down

0 comments on commit db9a3a8

Please sign in to comment.