Skip to content

Commit 4f38292

Browse files
committed
Fix up test_concat
1 parent 67fd4ff commit 4f38292

File tree

2 files changed

+206
-61
lines changed

2 files changed

+206
-61
lines changed

xarray/core/concat.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -461,12 +461,11 @@ def process_subset_opt(opt, subset):
461461
and opt != "minimal"
462462
and original != concat_over
463463
):
464-
emit_user_level_warning(
464+
warnings.append(
465465
opt.warning_message(
466466
"This is likely to lead to different results when multiple datasets "
467467
"have matching variables with overlapping values.",
468-
),
469-
FutureWarning,
468+
)
470469
)
471470
else:
472471
valid_vars = tuple(getattr(datasets[0], subset))
@@ -486,8 +485,13 @@ def process_subset_opt(opt, subset):
486485
)
487486
concat_over.update(opt)
488487

488+
warnings = []
489489
process_subset_opt(data_vars, "data_vars")
490490
process_subset_opt(coords, "coords")
491+
492+
for warning in warnings:
493+
emit_user_level_warning(warning, FutureWarning)
494+
491495
return concat_over, equals, concat_dim_lengths
492496

493497

0 commit comments

Comments
 (0)